![]() |
|
|
|||||||
![]() |
ASP Net - Master Pages changes my image ID; breaks JS code |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello,
I'm converting a 1.1 app to 2.0 and decided to try out master pages. My menu system consists of images with onmouseover/out events to highlight selected menu items, and to display submenus. These events are attached to javascript functions which rely on the image id to appropately locate and swap images, display submenus at the right location, etc. Anyways, this worked fine initially in 2.0, but when I introducted master pages to the mix, my rendered html shows that my image ids are no longer named as specified. Instead they are prefixed with ct100_. Consequently, this breaks my rollover effects and javascript submenus which rely on my originally named image ids. As stated, my image ids were not modified until I moved the code into master pages. Is there a way to prevent asp.net from changing my specified image id under master pages? Thanks. Brian anony |
|
|
|
|
#2 |
|
Posts: n/a
|
You probably need to generate some of your JavaScript on the fly so it can
build in the generated name of the image control. You can get the name from the server-side ClientID property. "anony" <> wrote in message news > Hello, > > I'm converting a 1.1 app to 2.0 and decided to try out master pages. My > menu system consists of images with onmouseover/out events to highlight > selected menu items, and to display submenus. These events are attached > to javascript functions which rely on the image id to appropately locate > and swap images, display submenus at the right location, etc. > > Anyways, this worked fine initially in 2.0, but when I introducted master > pages to the mix, my rendered html shows that my image ids are no longer > named as specified. Instead they are prefixed with ct100_. Consequently, > this breaks my rollover effects and javascript submenus which rely on my > originally named image ids. > > As stated, my image ids were not modified until I moved the code into > master pages. Is there a way to prevent asp.net from changing my > specified image id under master pages? > > Thanks. > Brian > Ken Cox - Microsoft MVP |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VHDL code for SPI Master | shah_satish2002 | Hardware | 2 | 07-22-2007 08:12 PM |
| Classic Original Broadcasts Trading List - Updated ( w/o/c ) | porkys1982@sbcglobal.net | DVD Video | 0 | 12-05-2005 03:38 AM |
| Classic Original Broadcasts Trading List - Updated ( w/o/c ) | porkys1982@sbcglobal.net | DVD Video | 0 | 11-19-2005 04:46 PM |
| Original Airings : The A-Team , M*A*S*H , Taxi , Barney Miller , WKRP | porkys1982@sbcglobal.net | DVD Video | 0 | 08-15-2005 03:09 AM |
| Image acquires Criterion | Goro | DVD Video | 2 | 08-04-2005 02:28 AM |