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:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old December 12th, 2004, 09:54 PM
felixcattus felixcattus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 felixcattus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile pasteHTML - IRRITATING PROBLEM

I am using pasteHTML to insert an img tag into a WYSIWYG editor. It works great, except I specifically tell it to use the absolute address...

editor_obj.pasteHTML('<img src=\'http://www.domain.com/image_path.jpg\'>');

...it trims off the absolute domain and uses "/" so it ends up like this:

<img src="/image_path.jpg">

THAT IS SO ANNOYING!!! ANY IDEAS?? It must be the absolute image address because these things will go out in an email.

I've tried tricking it by using HTML ISO 8859-1 character codes, but to no avail.

HELP!

Reply With Quote
  #2  
Old August 8th, 2005, 09:13 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 536 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 1 h 11 m
Reputation Power: 3
WYSIWYG frustration

Maybe it's a WYSIWYG bug or setting? You could hand-code, or at least hand-edit, your HTML page.

Reply With Quote
  #3  
Old August 8th, 2005, 08:19 PM
proghelper proghelper is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 12 proghelper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 46 m 21 sec
Reputation Power: 0
Exclamation

Is it possible to get the image location into a string variable and use that string variable in the statement?

---------------------------------------

Programming ( Assignment / Project ) Help

Reply With Quote
  #4  
Old August 9th, 2005, 08:14 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 536 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 1 h 11 m
Reputation Power: 3
image info as string

You could try hard coding the path and just pass the image file's name as a variable like:
Code:
<a href="http://www.yourDomain.com/" + imgVar + " />";

or in your case maybe like
Code:
editor_obj.pasteHTML('image_path.jpg');

I'm not familiar with how or why a WYSIWYG would truncate your variable.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > pasteHTML - IRRITATING PROBLEM


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 5 hosted by Hostway