JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old February 11th, 2005, 03:43 AM
Loebb Loebb is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 Loebb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 27 sec
Reputation Power: 0
Question pasteHTML -> problem withz relative links

Hi there,

I have a html site running on a localhost http://localhost/test.html which includes
an iframe ID=myIframe and contentedit=true.

I use pasteHTML to insert a link in myIframes document which works properly.

The links target is relative (/page2.html).

For some reason this relative address is changed to http://localhost/test.php. (Apache localhost).
If I paste "www.yahoo.com" instead of "/page2.html" the links href is changed to http://localhost/www.yahoo.com.

How can I keep my relative links?

Thank you

Loebb

Reply With Quote
  #2  
Old February 11th, 2005, 08:17 AM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hi Loebb. If I'm not mistaken, the problem is the "/" at the begining of you page. When you use "/" you're telling the server to locate the page on the root of your site...therefore http://localhost/

If the page is in the same level as the test.html page, simply use ("page2.html"). Same with the links...(although, since you're pointing to yahoo.com, you could as well use the whole path htp://www.yahoo.com, since it's not going to change like your website might).

Hope It works......

Anibal.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > pasteHTML -> problem withz relative links


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway