|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > pasteHTML -> problem withz relative links |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|