Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 09-09-2007, 06:18 PM innerHTML
Novice Talker

Posts: 6
Trades: 0
Hello! I am trying to insert picture into another div, but I can't get it work. I think I have some syntax stupidity... here is it:

<a href="#" onmousedown="document.getElementById("imgLy").inne rHTML='<img src="gallery/image01.jpg">';">Img</a>

any help? thanx
Cico is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2007, 06:29 PM Re: innerHTML
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
What about the space in inne rHTML
joder is offline
Reply With Quote
View Public Profile
 
Old 09-09-2007, 06:43 PM Re: innerHTML
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by joder View Post
What about the space in inne rHTML
nop. that's not that. it've just mistaken here... sorry
Cico is offline
Reply With Quote
View Public Profile
 
Old 09-09-2007, 08:43 PM Re: innerHTML
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Are you trying to do a mouseover equivalent?

If so, why not just take a script like this and replace it with onmousedown ?

http://www.javascripter.net/faq/onmouseo.htm
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-10-2007, 03:12 AM Re: innerHTML
Novice Talker

Posts: 13
Name: Ham
Location: Singapore
Trades: 0
Quote:
Originally Posted by Cico View Post
Hello! I am trying to insert picture into another div, but I can't get it work. I think I have some syntax stupidity... here is it:

<a href="#" onmousedown="document.getElementById("imgLy").inne rHTML='<img src="gallery/image01.jpg">';">Img</a>

any help? thanx

<a href=# onmousedown="document.getElementById('imgLy').inne rHTML='<img src=\"gallery/image01.jpg\">';">Img</a>
__________________
HAFIOŠ Networks -
Please login or register to view this content. Registration is FREE

Exclusive webhosting services
hafio is offline
Reply With Quote
View Public Profile Visit hafio's homepage!
 
Old 09-10-2007, 04:37 AM Re: innerHTML
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Not sure if that'll work, hafio. HTML doesn't know about escaping (since it's the HTML double quotes you're trying to escape). I'd try using single quotes and escape those, instead.


Code:
<a href=# onmousedown="document.getElementById('imgLy').innerHTML='<img src=\'gallery/image01.jpg\'>';">Img</a>
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to innerHTML
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18810 seconds with 12 queries