View Full Version : hyperlink is not working on giving dynamic link value
02-13-2009, 05:40 AM
"<table><tr><td><b>Attachments: </b></td><td><a href='"+link+"'> click here</a></td></tr>";here in the link the value 'C:/Documents and Settings/Administrator/Desktop/check.js' is coming.I have checked it using alert.
But when I am clicking on the link nothing happens,no error comes.and when I right click the link the same file which is in giving specified location is getting saved....I tried many options but all in vain.
Can somebody help me.I am totally confused what to do now????
02-13-2009, 06:03 AM
file:///C:/Documents and Settings/Administrator/Desktop/check.js
02-13-2009, 06:59 AM
Thanks for your quick reply... :)
It shows the location file:///C:/Documents and Settings/Administrator/Desktop/check.js
when I put mouse over the link....but does nothing,only when I click on save as target it is getting saved ,I am getting the file values from java,is there any need to use encodeURL to encode the link value.
pointer = rs_attachment.getString("Pointer");
String pointer1 = URLEncoder.encode(pointer);
now I am accessing this pointer1 in js using :
in link the pointer1 is coming:
"<tr><td></td><td><a href='"+link+"'> here</a></td></tr>";
the thing is here that I can't give a specific value because there are many files I have to access.Is there any solution????
02-13-2009, 03:20 PM
02-16-2009, 04:17 AM
02-16-2009, 09:23 AM
I am working in protlet context so is the problem is occuring that I am accessing the localfiles from browser because when I am making a simple html program to open it,it is easily opened.Is the problem due to switching the context??and if it is so then what can be the solution???
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.