codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Arbitrary attributes on div  clloyd at 21:59 on Saturday, June 26, 2004
 

In IE, you can have:

<div id='mydiv' foo='bar'>

and access the value with mydiv.foo (which is very helpful for passing params to the javascript). This doesn't appear to work in Netscape, although you can assign a value to mydiv.foo in javascript.

Am I missing something? Is there a way to put arbitrary attributed on a div tag with Netscape?

Thanks!
Charles.


  Re: Arbitrary attributes on div  clloyd at 22:59 on Saturday, June 26, 2004
 

Doh! I figured it out right after posting this...

In Netscape you can have the attribute in the tag, but you must use:

fooVal = mydiv.getAttribute("foo");

to access it in javascript.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Header Frame ?
•  Re: Adhyayan - Annual Student Conference and Online Coding Festival
•  Re: calling C# from javascript
•  Re: Gidview row disable
•  Re: Knowing how to get TaylorMade R11 Irons
•  Re: refresh parent after closing pop up window
•  TaylorMade RocketBallz RBZ Driver will travel long and low
•  Supposedly the TaylorMade R11 Irons are supposed
•  TaylorMade R11s Fairway Wood


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012