Sign in to follow this  
Followers 0
Mast3rpyr0

Javascript help

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0