May 17, 2012, 01:37:38 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome to the Magic Toolbox forum!
Home
Help
Search
Login
Register
MagicToolBox forum
>
MagicToolBox products
>
Magic Magnify
>
Javascript interfering with asp.net controls
Pages: [
1
]
« previous
next »
Print
Author
Topic: Javascript interfering with asp.net controls (Read 992 times)
Norton1
Newbie
Posts: 3
Javascript interfering with asp.net controls
«
on:
July 03, 2010, 11:36:14 pm »
Hi. I downloaded the free trial version of magic magnify and would like to purchase the license for use on my site if I can get it to work correctly. I'm running vb.net and I'd like to use it on a content page (Master Page/Content Page). Because it is a content page and the master page has the header, I've had to do a little more than just copy and paste the code you provide. It looks like I'm doing something wrong, though. I've uploaded the script files to a folder called "MM". On the content page, in the page.load event, I've done this . . .
Dim h As LiteralControl = New LiteralControl
h.Text = "<script type='text/javascript' src='MM/magicmagnify.js' />"
Me.Page.Header.Controls.Add(h)
If (Not Master.Page.ClientScript.IsStartupScriptRegistered("magicmagnify")) Then
Master.Page.ClientScript.RegisterStartupScript(Me.GetType(), "magicmagnify", "insideJS();", True)
End If
And on the image (in the asp:content section) I've done this . . .
<a href="IMAGES/PRODUCTS/SHOULDERRESTS/NVSR3110.GIF" class="MagicMagnify"><asp:Image runat="server" ID="imgProductImage" /></a>
All works fine with the magnifier. However, adding this script to my page has rendered the asp:treeview that I use for a menu inoperative. To be more precise, none of the active menu items pop out as they should and the user can only select the root item in each section of the treeview. I'm guessing that because ASP uses Javascript in the generation of their treeview, the new script is interfering somehow.
Have you seen this before? I haven't used javascript very much in my pages, so perhaps I'm just making a general javascript type error. Any suggestions?
Logged
Norton1
Newbie
Posts: 3
Re: Javascript interfering with asp.net controls
«
Reply #1 on:
July 03, 2010, 11:56:19 pm »
. . . Sorry. It's an asp:Menu, not a treeview. And, I should have mentioned . . . the menu in question resides on the master page and is dynamically populated in the master page's page load event.
Logged
igga
MagicToolBox Team
Sr. Member
Posts: 331
Re: Javascript interfering with asp.net controls
«
Reply #2 on:
July 04, 2010, 04:49:27 am »
Hi! Could you please send us link to your page for investigation?
Logged
MagicToolbox.com Support Team
Norton1
Newbie
Posts: 3
Re: Javascript interfering with asp.net controls
«
Reply #3 on:
July 04, 2010, 08:57:47 am »
https://www.fisherviolins.com/test2.aspx?item=nvmm2160
Logged
igga
MagicToolBox Team
Sr. Member
Posts: 331
Re: Javascript interfering with asp.net controls
«
Reply #4 on:
July 04, 2010, 12:58:10 pm »
As I can see Magic tool works fine on this page. But there are 2 js errors:
1. insideJS is not defined
insideJS();var ctl00_ctl02_Data = new Object();
2. DynamicScriptCall is not defined
I don't now how it can be related with Magic Magnify Script. Looks like external file with insideJS() definition has not been connected.
Logged
MagicToolbox.com Support Team
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MagicToolBox products
-----------------------------
=> Magic Zoom Plus
=> Magic Zoom
=> Magic Thumb
=> Magic Magnify
=> Magic Touch
=> Magic Slideshow
-----------------------------
General Category
-----------------------------
=> General Discussion
Loading...