Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-02-2002, 07:04 AM   PM User | #1
wanye
New Coder

 
Join Date: Sep 2002
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
wanye is an unknown quantity at this point
how do create both image/text link in xsl..??

how do create a image link in xsl..??
for example, how to write a xsl that both accepts text and image from an input field and display it as an image link if image is inserted, else will display text link if text is inserted...??
wanye is offline   Reply With Quote
Old 10-12-2002, 07:50 PM   PM User | #2
dhtroy
New Coder

 
Join Date: Oct 2002
Location: Atlanta
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
dhtroy is an unknown quantity at this point
Since I am not familar with how your images are being stored, or how you plan on determining what's an image, verse just plain text - I'm flying kinda blind, but this is what I can offer up:

Might be better off passing the return value from your INPUT element to a script that does an If...Exists on the file ( to see if it's a valid image ) and either inserts a <IMG> back into the document or straight text.

Then you just need a <DIV> tag in your HTML that has an ID, you reference in your script and do a call to the DOM method innerHTML, to insert your value.

Through XSL ... you might be able to work something out with <xsl:choose> statements, but again, since I do not know how your images are stored, I'm not certain how you'll validate the text is a valid image or just "text".

If you can expand more on your situation, it might help.

D.
dhtroy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:59 AM.


Advertisement
Log in to turn off these ads.