Forum Moderators: phranque

Message Too Old, No Replies

sending table IDs to an ASP page

         

NotAFanOfPrograming

6:09 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I have some javascript code that get data from a sever and then writes it into a table within the same HTML page. After that is done I want to take the values of these javascript values or the table IDs and pass them to an ASP for insertion into a database. I know you cannot pass JS variables to an ASP page but can you pass html <table><TD> IDs to an asp page. OR is there a different way to pass these variables to an ASP page?

my code:
<table border=1>
<tr><td>value:</td>
<td id="tdValue"></td></tr>
</table>

**the "tdValue" is the javascript variable that gets written into the html on that page.

Thanks.

Raymond

7:23 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



pass them in hidden forms

NotAFanOfPrograming

7:32 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



such as? Make a <input type="hidden" name="tdValue">?

Raymond

8:23 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



<input type=hidden name=fieldname value=fieldvalue>

or write it as a querystring like

.asp?var1=value1&var2=value2

NotAFanOfPrograming

12:29 pm on Jul 14, 2004 (gmt 0)

10+ Year Member



ok i tried what you said and it makes sense and works to a degree. But the global javascript variable I have, myValue, is not passing its actual string content. If i have ... value=myValue> the asp page gets "myValue" not the whole number it's supposed to. So the global javascript variable is not getting passed into the HTML portion of my page. Help?

Thanks

NotAFanOfPrograming

12:41 pm on Jul 14, 2004 (gmt 0)

10+ Year Member



nevermind i figured it out, thanks for the input though. Your advise led me to the answer! :)