joecool2005 Posted December 22, 2005 Share Posted December 22, 2005 Hi all,I want to execute a URL like this:execScript("https://support.drtax.ca/im/scripts/Ufilereg.ASP")If you execute the URL alone you will see the output like this "ufilestatus=1"How can I put the output in a variable. Or how can I compare the the output with a variable.ThxJoe Link to comment Share on other sites More sharing options...
aspnetguy Posted December 22, 2005 Share Posted December 22, 2005 you cannot get a value from another page with javascript.you would have to load the page window.location = "the url" then on the new page do the processing there...do you need to use javascript or ASP? Link to comment Share on other sites More sharing options...
joecool2005 Posted December 22, 2005 Author Share Posted December 22, 2005 ASP or javacript.The one that I can handle the output easierJoe Link to comment Share on other sites More sharing options...
aspnetguy Posted December 22, 2005 Share Posted December 22, 2005 assuming you used response.write() to write the output to the screen in the first place it would probably be easier to use ASP.Instead of using response.write(the_output) you could write dim theVariable = the_output What do you need to do with this variable? It would be easier if you posted your code aswell so I don''t have to keep guessing how you've done things. Link to comment Share on other sites More sharing options...
joecool2005 Posted December 22, 2005 Author Share Posted December 22, 2005 Here's the codeUfileReg.ASP if oCompany.mActiveFlag = "Y" then oUser.mFirstName = Request("FirstName") oUser.mLastName = Request("LastName") oUser.mCountrycode = "001" 'sCountryCode oUser.mPhoneNumber = Request("DayPhone") Response.Write("ufilestatus=1")else Response.Write("ufilestatus=-1") It's supposed to display "ufilestatus=1" or "ufilestatus=-1". UfileReg.ASP it's written by somebody else. I can't change it.Now on other file, by doing execScript("https://support.drtax.ca/im/scripts/Ufilereg.ASP")I want to use the "ufilestatus" to compare if it's 1 or -1. With this, I know if a company exist or not.ThxJoe Link to comment Share on other sites More sharing options...
aspnetguy Posted December 23, 2005 Share Posted December 23, 2005 If you cannot change anything with the ASP file I don't think there is anyway to get that value to another page unless you open the ASP in an iframe (you can hide it if you want) and then use javascript (on the original page) to access the iframe content. var myFrame = document.getElementById('iframeId');var result = myFrame.document.body.innerHTML; Providing that the ASP page does output anything else besides the value you want then it should now be stored in the result variable. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now