Jump to content

Javascript help


Recommended Posts

Ok im writing a program to interact with a web page im making but first i have to make the javascript page.

my html file has this line:

<script LANGUAGE="javascript" src="Rxxx.js?res_name=12&AmountVarName=323.34"></script>

and it loads the .js file fine but my problem is that i need to use the res_name and AmountVarName from the src URL and im not sure how to do that from my .js file.

Any suggestions?

Link to comment
Share on other sites

Use the FlowScript API:

http://cocoon.apache.org/2.1/userdocs/flow/api.html

var value = cocoon.request.getAttribute("res_name");

Edit: The more common case would be that there would be a PHP script spitting out the JS on the other end.

Edit2: Or look at this once it comes back up again: Passing Query String Parameters to External java script: http://feather.elektrum.org/book/src.html

#)

Edited by nfwu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...