|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
I'm new to WML. I'm confused with the scope of variables.
I thought that the variables are global to all cards in the same deck. But apparently it's not. Here's part of my code: <p>Please enter a course code:</p> <input name="course_code" size="9"/><br/> <anchor>Submit<br/> <go href="wml.cgi" method="post"> <postfield name="action" value="submit_course"/> </go> </anchor> I didn't pass $(course_code) but in another deck, I tried to display $(course_code), and it was displayed correctly. How did it happened? thanks. oli |
|
#2
|
|||
|
|||
|
You should use something like
<p>Please enter a course code:</p> <input name="course_code" size="9"/><br/> <anchor>Submit<br/> <go href="wml.cgi" method="post"> <postfield name="action" value="submit_course"/> <postfield name="course_code" value="$(course_code)"/> </go> </anchor> |
|
#3
|
|||
|
|||
|
I know I should include the line
<postfield name="course_code" value="$(course_code)"/> but somehow even I didn't include it, $(course_code) is still passed correctly to another deck. That's why I'm confused. Also, if I used 'course' instead of 'course_code' as the name of the field, should the name of variable be '$(course)' or '$(course_code)'? If it's the latter one, what's the point of having the name? Thank you. oli |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > variable scope |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|