LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   read client-side variable out of webpage (https://www.linuxquestions.org/questions/linux-newbie-8/read-client-side-variable-out-of-webpage-325959/)

jeffreybluml 05-22-2005 12:05 PM

read client-side variable out of webpage
 
I've got a webpage I need help reading variables out of. It's actually a wml page for a wap site. I've got forms set up to enter name, city, and state. How can I read these out of the page via some action from the client, so that I can incorporate the three variables into a URL template text file on my server?

Currently I have to reuest a non-existant URL with the three variables in it from my server, and then I read these out of the access log and strip the variables that way. This sucks, because when you request the non-existant URL from my server you get taken to the 404 not found page, and then you have to click back.

So, I assume there HAS to be a way to make the client somehow communicate the variables to the server, but I'll be darned if I can figure out how. This wml markup is so strict that it seems doubtful the solution will be in the page source.

Oh, and I DO have server-side includes ENABLED, so I expect the solution will somehow come from that avenue...

Anybody feel like pointing me in the right direction here? Seriously appreciate it...

Thanks in advance,

Jeff

pnellesen 05-23-2005 11:54 AM

First, I'm not much familiar with WML, so these questions might seem stupid, but is there any kind of client scripting language for it like JavaScript or something? Where does the form currently post to? Seems like you should be able to write some kind of server-side script for the page the form posts to that grabs those variables before displaying the page? (Again, I'm just throwing ideas out here based upon my HTML knowledge...)

Hope this helps a little.

jeffreybluml 05-23-2005 12:02 PM

Hmmm, that does make me think...

Unfortunately, I'm no wml expert either. I keep cutting and pasting examples from the web. Currently, the form doesn't actually post to anything. It jsut sets up three variables on the page and I have a link you can click on that incorporates the variables, like so:

Code:

http://mysite.com/dir/dir2/$(variable)&$(variable2)&$(variable3)
So, you see it doesn't actually post TO anything. BUT, that's a great avenue for me to explore....getting it to do so...

I can only assume you CAN post TO some file with wml, so I think this is where I need to focus. Minimal Javascript is supported, but I don't even want to go down that road ;)

THanks for replying (not a popular topic I see :( ), I'll look around and see if this is where the solution lies...

Thanks,


All times are GMT -5. The time now is 07:20 AM.