LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-01-2004, 09:47 PM   #1
scabies
LQ Newbie
 
Registered: Dec 2003
Location: richmond, VA
Distribution: ubuntu
Posts: 25

Rep: Reputation: 15
any good ideas for disabling links?


i have sort of an odd problem...

i have some display pages that include links (when clicked, javascript confirm box pops up) and when they are clicked and confirmed, i would like to disable the links. i know that if they were buttons it would be fairly straightforward; however due to the overall design and code making them buttons would be a poor design choice. i'll note that the javascript is being output into the page by PHP.

so is there a way to use the javascript to display the HTML for the link, and then upon confirm, re-displaying it to not be a link? or some other way? for the sake of completeness i've included the code for the links below. any ideas would be a huge help!

thanks in advance,
mike



$title = CLICK_TO ."${action}". " ". THE_LOWERCASE ."${servername}". SERVER;
println(" <td class=\"$class\"><div class=\"${action}button\"><a href=\"${filename}?appID=${appID}&action=${action}&mode=${mode}&servertype=${servertype}\" title=\"$title\"");
println(" onClick=\"return confirm('". ARE_YOU_SURE_YOU_WISH_TO ."$laction $servername?')\"");
println(" onMouseOver=\"javascript:window.status='". $title ."';return true;\" onMouseOut=\"javascript:window.status=''; return true;\">". $action ."</a></div></td>");
 
Old 07-02-2004, 07:09 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Why don't you make it in php ? like
PHP Code:
// if I come from clicked link
if( $_SERVER["HTTP_REFERER"] == $your_form_url )
{
    
// add code without links
}
else
{
    
// add code with links

 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Me, Career report, good ideas karlan General 0 06-08-2004 06:56 PM
Need Ideas on Good Enterprise Email JCScoobyRS Linux - General 1 09-17-2003 10:32 AM
Are there any good links? missy Linux - Newbie 4 08-07-2003 02:49 AM
Good Linux Links ?? JunLitsu Linux - General 6 04-11-2002 12:56 AM
Linux Links. Know of any good ones? Colonel Panic General 12 09-17-2001 11:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration