Dixit Gisle Dankel (15.10 30.01.2004): >www.tradesports.com >Here's an example of a javascript function call in a link: ><a href="#" onClick="javascript:trade(88190);return false;">Trade This Now!</a> >And here's the trade function: >function trade(conID) { > document.POSTGSX.request_operation.value = "trade"; > document.POSTGSX.request_type.value = "action"; > document.POSTGSX.selConID.value = conID; > document.POSTGSX.location.value = "TradeCentre"; > document.POSTGSX.submit(); >}
POSTGSX is the name of a form on the web page. request_operation etc. are the different parameters in the form. Their values are set with the javascript. You need to post something like this to the server: request_operation=trade request_type=action selConID=conID ; remark: replace this with whatever value the variable represents (i.e. whatever number is passed to the javascript function, e.g. 88190) location=TradeCentre As for how to POST via the HTTP protocol, cf. http://www.w3.org/Protocols/rfc2616/rfc2616.html. >I don't know much about javascript and HTTP post. > From what I can gather I need to send the same information to the server as the > submit() function above, but I have absolutely no idea of what information is sent > or how to send it. Also, how do I receive the result? Can I open an http port to > achieve this? > >Any help greatly appreciated! >Cheers, >Gisle > >-- >To unsubscribe from this list, just send an email to >[EMAIL PROTECTED] with unsubscribe as the subject. Prętera censeo Carthaginem esse delendam -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.