File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes creating image link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "creating image link" Watch "creating image link" New topic
Author

creating image link

indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
Hi,

Am trying to get this image link eachtime when dynamic row is created .


how to create this image link element in javascript ?

thanks


thanks,
indu
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

You forgot to post your code.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
createElement and appendChild seems like the way to go.

Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Eric Pascarello wrote:createElement and appendChild seems like the way to go.

Eric


Unless he's using a library. That's why we need the code. To know exactly how to guide him.


GenRocket - Experts at Building Test Data
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
In html, the code is

when I click the ADD button, the textbox along with image link should be appended to the new row, to take new input..
javascript function is..With this code, the imagelink is appending to eachrow - but, refreshes the value of the textbox ,(the rows are adding,but it assigns the value for first row textbox only, thus refreshes)
Can I try something like this ?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why are you asking if you can try something like this? Did you try it? What happened?

Eric
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
I tried , with this code am creating only image with out the link.(anchor is not adding to the image)
Can you please tell me how to create an active image and make a call to the function with the newly entered values ....
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
well you are not adding the href to the link, without the href, a link does not render as a link in most browsers.

Eric
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
thanks, ... when I code like this,


the rows are adding, but the date field is refreshing always. Only the first row date field is affecting.The rest datefields are empty.
Which parameter has to send to the javascript function ::: NewCal('dte','ddmmmyyyy')" here ?

In html , the function is
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
sorry I forgot to write the function in HTML :::

NewCal('dte','ddmmmyyyy')
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating image link