Click here to Skip to main content
15,926,939 members
Home / Discussions / Web Development
   

Web Development

 
GeneralNeed help using Visual Studio.Net! Pin
dardanius6-Apr-02 4:50
dardanius6-Apr-02 4:50 
GeneralTimer question Pin
alex.barylski5-Apr-02 18:39
alex.barylski5-Apr-02 18:39 
GeneralRe: Timer question Pin
alex.barylski6-Apr-02 0:36
alex.barylski6-Apr-02 0:36 
GeneralRe: Timer question Pin
James T. Johnson6-Apr-02 2:00
James T. Johnson6-Apr-02 2:00 
GeneralRe: Timer question Pin
alex.barylski6-Apr-02 2:11
alex.barylski6-Apr-02 2:11 
GeneralRe: Timer question Pin
James T. Johnson6-Apr-02 2:11
James T. Johnson6-Apr-02 2:11 
GeneralRe: Timer question Pin
alex.barylski6-Apr-02 2:38
alex.barylski6-Apr-02 2:38 
GeneralgetElementById trick question. Pin
alex.barylski5-Apr-02 14:40
alex.barylski5-Apr-02 14:40 
I'm sure it's not really a trick question, but i've only prorgammed in Jscript for a couple months, so i'm still a little shaky.

In trying to keep with xhtml standards...attributes and such are all enclosed in quotes

Hello


Now it's usually easy to move the divsion about the screen

document.getElementById("ThisIsMyID").style.pixelLeft = 100;

(I think i've done that right, thats not the problem i'm having)

What i'd like to know...assuming I have 20 element ID's stored in array and I wanted to make all but the 5th element invisible I might do something like:

for(i=0; i < 20; i++){
  if(i != 5){
    document.getElementById(myArray[i].DivID).style.visibility = "hidden";
  }
}


I'm thinking because the id was encapsulated in quotes and the ID's in the array are not...getElementById is failing for this reason...?

When I directly call getElementById("ThisIsMyID") everything works fine and when I try and use the ID stores in the array it fails...what gives...?


I've tried wrapping the ID in quotes like this:

var temp = "\""+myArray[i].DivID+"\"";

and passing this to the getElemenById function but still no luck.

I have also generated HTML on the fly and used the following
menuCode += "<td class='MenuItem' ShowPopup('"+barRef[i].DivID+"', this); \" >"+barRef[i].Caption+"</td>";  


the above worked fine, why won't iterating the array work..?

Any ideas...?

Thanx! Smile | :) Smile | :) Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: getElementById trick question. Pin
Andy Smith5-Apr-02 14:51
Andy Smith5-Apr-02 14:51 
GeneralRe: getElementById trick question. Pin
alex.barylski5-Apr-02 15:45
alex.barylski5-Apr-02 15:45 
GeneralRe: getElementById trick question. Pin
alex.barylski5-Apr-02 15:48
alex.barylski5-Apr-02 15:48 
GeneralVisual Studio .NET and ASP.NET question Pin
leydel5-Apr-02 11:33
leydel5-Apr-02 11:33 
GeneralRe: Visual Studio .NET and ASP.NET question Pin
Andy Smith5-Apr-02 11:42
Andy Smith5-Apr-02 11:42 
Questionhow can we access records in asp page from database without submiting form Pin
5-Apr-02 7:56
suss5-Apr-02 7:56 
AnswerRe: how can we access records in asp page from database without submiting form Pin
Nick Parker5-Apr-02 10:16
protectorNick Parker5-Apr-02 10:16 
AnswerRe: how can we access records in asp page from database without submiting form Pin
Not Active5-Apr-02 14:00
mentorNot Active5-Apr-02 14:00 
GeneralDrop down menus Pin
alex.barylski5-Apr-02 0:00
alex.barylski5-Apr-02 0:00 
GeneralRe: Drop down menus Pin
Philip Patrick5-Apr-02 3:36
professionalPhilip Patrick5-Apr-02 3:36 
Generalaccessing data from database with submit form Pin
4-Apr-02 20:11
suss4-Apr-02 20:11 
GeneralRe: accessing data from database with submit form Pin
MS le Roux4-Apr-02 20:09
MS le Roux4-Apr-02 20:09 
Generaljava script variable through asp Pin
4-Apr-02 19:35
suss4-Apr-02 19:35 
GeneralRe: java script variable through asp Pin
MS le Roux4-Apr-02 21:38
MS le Roux4-Apr-02 21:38 
GeneralRe: java script variable through asp Pin
alex.barylski4-Apr-02 23:41
alex.barylski4-Apr-02 23:41 
GeneralRe: java script variable through asp Pin
alex.barylski4-Apr-02 23:47
alex.barylski4-Apr-02 23:47 
GeneralASPX Hosting Pin
Albert Pascual4-Apr-02 12:21
sitebuilderAlbert Pascual4-Apr-02 12:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.