![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2008
Posts: 5
Rep Power: 0
![]() |
The last problem is ok now!!
I would like to save/get some web pages which i'm browsing like 'save as' function and make some modification to that webpage and then rewrite to the browser again using javascript. Is it possible? If then, which function I have to use to retrieve that page and then to rewrite. Please tell me!! |
|
|
|
|
|
#2 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
Re: javascript web page reader and writer
Get the source of the target on the server using file_get_contents(assuming your using php on the server side) or something similar. Then you could probably parse this and ask the user the parts they want to change.
__________________
Quote:
|
|
|
|
|
|
|
#3 |
|
12 years old
Join Date: Nov 2007
Posts: 107
Rep Power: 0
![]() |
Re: javascript web page reader and writer
Kruptof, nice, BUT IT'S NOT PHP, MMKAY?
What he means is have it so the page is editable to the editor. |
|
|
|
|
|
#4 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
Re: javascript web page reader and writer
Well she didn't state which sever side language she was using and I did me make an ASS of yoU and ME. I as far as my knowledge goes(not far) I don't think you can do this alone on the client side without any help on the server side.
__________________
Quote:
|
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Jan 2008
Posts: 5
Rep Power: 0
![]() |
Re: javascript web page reader and writer
I mean...I just want to write something like firefox extension for my project. And I need to retrive the web page and then make some modification (matching with the keywords, it's part of my project) and then open a new page and put my modified web page onto it. It's no need to change the server side. I just only want to get the function which will be work as 'save as' function and then rewrite to a browser(firefox) again. I'll have to use JavaScript and Java.
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() |
Re: javascript web page reader and writer
You can do this using an asynchronous request with Javascript to the server, if the Javascript is provided by the same server that you want to make the request to. This process is known as "AJAX".
And I believe kruptof is correct in saying that there's no way to do it without help by the server (in this case, the "help" qualifies as a separate page that provides the Javascript). If you did it with Java, it's a completely different story. |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Jan 2008
Posts: 5
Rep Power: 0
![]() |
Re: javascript web page reader and writer
yeah...
I now know that I can do it without opening new page, just getting that page from the proxy server before it is shown in the web broswer and then make modification and then send it to the web browser.. just like some web filters.... but the question is how can i get that page from the proxy???? |
|
|
|
|
|
#8 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: javascript web page reader and writer
You may be interested to know that the Web Developer toolbar extension for Firefox provides this functionality. Perhaps you could look at its source code - I believe Firefox extensions are written partly in JavaScript. It'll be complicated though - it's a huge project.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|