Thread View: aus.computers.java
1 messages
1 total messages
Started by Adam Arnel
Sun, 01 Aug 1999 00:00
JavaScript : Variables in Coding ?
Author: Adam Arnel
Date: Sun, 01 Aug 1999 00:00
Date: Sun, 01 Aug 1999 00:00
16 lines
1600 bytes
1600 bytes
When writing with JavaScript, I am using a varaible ( tempvar ), and am making a string from it using another numerical variable ( number ) to make a piece of coding which I wish to use in the javascript code ( tempvar = "document.img" +number +".src=picture.gif" ) so that the value of 'temp var' will be in the form of "document.img1.src=picture.gif" , or whatever the value of 'number' is at the time... I then wish to use this string in the code, how can i do this ? I have tried "document.write(tempvar)" and "return(tempvar)" and just simply "tempvar", but they just write the string to the page, instead of sticking the string in the coding to act as code and be manipulated.....I would be appreciative if anyone could help me with this, if so, please send any suggestions or tips to adam@ballarat.starway.net.au .... thanks adam arnel
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads