Images not showing up in javascript function on only some pcs..

B

Brian

Greetings all,

I have a page that when you click on a button, its calls a function
that dynamically displays a group of other buttons. The problem I am
having is that when you click on the button, the buttons do not appear,
however, if you hold your mouse over where they should be, the link is
actually there. This is only happening on some pcs. I can't figure
out why it is happening. does anyone have any ideas?

///////////////// Code Below ///////////////////////

////////////////////////////// Link that calls function
///////////////////////////////
<a href="javascript:;" onClick="showclient();" ><img
src="pix/arrow.gif" width="6" height="8" border="0"> Add a New
Client</a>

/////////////////////////////////////////////// function
//////////////////////////////////////
function showclient() {


document.getElementById("formtable").style.visibility ='visible';

var fname = '<%= Request("Fname")%>'
var lname = '<%=replace(request("LName"),"'","\'")%>';
var streetnum = '<%= Request("streetnum")%>'
var street = '<%= Request("street")%>'
var city = '<%= Request("city")%>'
var email = '<%= Request("email")%>'
var phone = '<%= Request("phone")%>'
var UcontactID = '<%= newID2%>'
var mobile = '<%= Request("mobile")%>'
var websearch = '<%=Session("calsearch")%>'
var regexp = /\'/g;
var agent = '<%= session("calagent")%>';




document.form1.maxofcontacttypename.options[0].selected=true;
document.form1.urgency.options[0].selected=true;
document.getElementById("pfirstname").value = '';
document.getElementById("plastname").value = '';
document.getElementById("sfirstname").value = '';
document.getElementById("slastname").value = '';
document.getElementById("houseno").value = '';
document.getElementById("street").value = '';
document.getElementById("city").value = '';
document.getElementById("email").value = '';
document.getElementById("PrimPhone").value = '';
document.getElementById("ucontactid").value = '';
document.getElementById("zip").value = '';
document.getElementById("Phone2").value = '';
document.getElementById("PhoneNumber").value = '';
document.getElementById("Mobile").value = '';
document.getElementById("Mobile2").value = '';
document.getElementById("email2").value = '';
document.getElementById("business").value = '';
document.getElementById("business2").value = '';
document.getElementById("bus_ext").value = '';
document.getElementById("bus_ext2").value = '';
document.getElementById("other").value = '';
document.getElementById("other2").value = '';
document.getElementById("otherdescrip").value = '';
document.getElementById("otherdescrip2").value = '';
document.getElementById("fax").value = '';
document.getElementById("fax2").value = '';


var formheader = "";

if (websearch == 'FALSE'){

document.form1.agent.options[0].selected = true;
document.getElementById("linkto").style.visibility = "visible";
formheader = "Add this client and have them linked to ";

}
else {
document.form1.agent.value = agent;
document.getElementById("linkto").style.visibility = "hidden";
formheader = "Add this client and have them linked to me.";
}


////////////////////// the showphone, notes and submit button will not
show up..

var submitbtn = '<table width=\"100%\" border=\"0\" cellspacing=\"1\"
cellpadding=\"1\"> <tr valign=\"top\"> <td class=\"style15\"
width=\"61%\" height=\"20\"><a href=\"javascript:;\"
onClick=\"MM_openBrWindow(\'showphoneblank.asp\',\'phones\',\'scrollbars=yes,resizable=yes,width=650,height=300\')\"><img
src=\"http://calcagniagents05.aegisis.net/pix/showphone.gif\"
id=\"showphone\" width=\"140\" height=\"15\" border=\"0\" ></a> <input
type=\"hidden\" name=\"MM_insert\" value=\"form1\"></td> <td
width=\"39%\" height=\"20\"> <a href=\"javascript:;\"
onClick=\"MM_openBrWindow(\'legacynotesblank.asp\',\'journal\',\'scrollbars=yes,resizable=yes,width=500,height=300\')\"><img
src=\"pix/notes.gif\" alt=\"notes\" width=\"78\" height=\"15\"
border=\"0\"></a></td> </tr> <tr valign=\"top\"> <td colspan=\"2\"
height=\"20\"><div align=\"center\"><br><input type=\"image\"
name=\"submit\" src=\"pix/legacyadd.gif\" width=\"238\"></div></td>
</tr></table>';



document.getElementById("submitbutton").innerHTML = submitbtn;

document.getElementById("formheader").innerHTML = formheader;
document.getElementById("showphone").style.visibility = "visible";


}
 
A

ASM

Brian a écrit :
Does anyone have an idea????????????????

put your example on line
and give its url
would be best


don't use MacroMedia functions (nobody can easily understand them)

try to do not write your html by javascript

Put all you html code in your page (all inputs and selects, buttons ...)
On page loadind have a function to hide (or style.display='none') your
form's elements (or beter : div containing them) you want.
Buttons display block element P containing the form element wanted.
 
B

Brian

Here is a page i just created.. I never had this problem before.. This
has always worked for me.. It seems to be a browser issue now.. It
works on some pc's, but not on others (primarily WinXP with IE6 SP2)

http://www.phcbl.com/test/legacy/legacyresulttest.asp

The onload calls the same function as the Add a new client link. As
soon as you click on the link, they disappear, but the text remains.
This makes absolutely no sense whatsoever..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top