-Sean Casey
Gawd
- Joined
- Mar 27, 2004
- Messages
- 672
Alright, I am working on a webpage that will be loaded in a frame (lets call it "topframe"). Another remote website (that I have no access to the code for) will every now and then go a certain page (lets call it "checkout.aspx", the site will be displayed in "bottomframe"). I need to be able to have something read the text on that remote page and then pass it to a variable on the local webserver. From there it will do some calculations, and depending on the result allow the remote page to stay loaded, or direct that frame to a different site.
Everything after reading the text from the remote site is a cake walk. My problem is I can not seem to figure out the best way (or anyway actually) to scan when the 2nd frame. Since I can not read the variable being used to create the text value, and the text value is variable, I need to:
1- determine what page is currently loaded in "bottomframe"
2- If the page in "bottomframe" is "checkout.aspx", read the contents of the page
3- search the contents for a set string, read all text from the first string to a second string to a string.
4- Eliminate any non-integer charachters, and once only numbers are left, convert to int.
From there I have no problem with my server side code. Since I need to support as many clients as possible I figure the client side code needs to be javascript (which I suck at, because if I have virtually no experience with it). Server side is C#, which I am fairly comfortable with.
Really I just need help with 1 and 2 as I probably could pass the entire content of the page into a variable and pass that to the server and have the server do the rest (probably easier to code 3 and 4 in C# than javascript).
Any ideas?
Everything after reading the text from the remote site is a cake walk. My problem is I can not seem to figure out the best way (or anyway actually) to scan when the 2nd frame. Since I can not read the variable being used to create the text value, and the text value is variable, I need to:
1- determine what page is currently loaded in "bottomframe"
2- If the page in "bottomframe" is "checkout.aspx", read the contents of the page
3- search the contents for a set string, read all text from the first string to a second string to a string.
4- Eliminate any non-integer charachters, and once only numbers are left, convert to int.
From there I have no problem with my server side code. Since I need to support as many clients as possible I figure the client side code needs to be javascript (which I suck at, because if I have virtually no experience with it). Server side is C#, which I am fairly comfortable with.
Really I just need help with 1 and 2 as I probably could pass the entire content of the page into a variable and pass that to the server and have the server do the rest (probably easier to code 3 and 4 in C# than javascript).
Any ideas?