hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : Replacing Source Code of Page (Javascript?)
Reply

Web Design and Content Subjects include, HTML, graphics, editors, CSS, Flash, graphics creation, placing of ads, ad serv companies, copyright, content and nearly anything else design related. Also talk about businesses that provide design services. If you link to your site, you must post in Web Site Reviews.
Forum Jump

Replacing Source Code of Page (Javascript?)

Reply Post New Thread In Web Design and Content Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-15-2011, 05:57 PM
person287 person287 is offline
WHT Addict
 
Join Date: Mar 2011
Posts: 138

Replacing Source Code of Page (Javascript?)


Hi,
I've got a page at http://coxnetworks.co.uk/printerinfo.php which contains an iFrame of coxnetworks.co.uk/printerstatus.php , however at the moment it can only be properly accessed on my local network since instead of being directed to the reverse proxy I've setup, the CSS/JS is directed to the IP Address 192.168.1.110 (You can see if you go there that the formatting will be messed up).

Is there any way that I could rewrite the Source Code (maybe in javascript), so all URLs pointing to http://192.168.1.110 now go to https://authentication.coxnetworks.co.uk/printer/ ?

Thanks

By the Way I can't edit the actual files on the printer's Web Server unfortunately, so I won't be able to do it that way.

__________________
My Site is Silicox Valley Technology
Follow me on Twitter, @person287

Reply With Quote


Sponsored Links
  #2  
Old 11-15-2011, 07:22 PM
Harzem Harzem is offline
Community Liaison
 
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090

__________________
Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.

HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!


Reply With Quote
  #3  
Old 11-16-2011, 04:17 PM
person287 person287 is offline
WHT Addict
 
Join Date: Mar 2011
Posts: 138
Thanks Harzem, but what have I done wrong with this code here?

Code:
<script src="https://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js" type="text/javascript"></script>
<script>
$('a').each(function() {
      $(this).attr("href", function(index, old) {
            return old.replace("http://192.168.1.100", "https://authentication.coxnetworks.co.uk/printer");
      });
});
</script>

__________________
My Site is Silicox Valley Technology
Follow me on Twitter, @person287

Reply With Quote
Sponsored Links
  #4  
Old 11-16-2011, 04:55 PM
Harzem Harzem is offline
Community Liaison
 
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
First of all, this is a more recent version of jquery:
http://ajax.googleapis.com/ajax/libs.../jquery.min.js

You apparently used "sime.vidas"s reply as he said it was better, but that code is incomplete. You may want to try the other answer, as it looks complete to me.

__________________
Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.

HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!


Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing links on page with javascript Arber Programming Discussion 4 03-18-2010 06:26 AM
Changed hosts from 1and1 to 123Reg but mozilla now shows source code rather then page noswad Web Design and Content 2 08-06-2005 01:15 PM
Status page & source code krisdv Hosting Software and Control Panels 1 05-07-2003 04:11 PM
Code Help - Replacing www. with IP Number wf19 Hosting Security and Technology 1 12-03-2002 11:21 PM

Related posts from TheWhir.com
Title Type Date Posted
Facebook's Recently Acquired Mobile App Platform Parse Launches Web Hosting for Developers Web Hosting News 2013-05-08 10:49:17
Web Host DreamHost Joins OpenStack Foundation as Gold Member Web Hosting News 2012-09-19 17:09:06
Hackers Breach GitHub Database to Expose, Demonstrate Flaw in Ruby on Rails Web Hosting News 2012-03-06 12:37:11
Microsoft Launches First Beta of Microsoft WebMatrix 2.0 Web Hosting News 2011-09-26 15:43:24
Web Host DreamHost Contributing Code for Ceph File System to OpenStack Web Hosting News 2011-06-23 20:40:32


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?