I m using a form which is posted through javascript on click of a image.Its working fine in IE but not in mozilla.
can anybody help me out?
my code is
can anybody help me out?
my code is
Code:
print("<form name=\"topPanelForm\" id=\"topPanelForm\" method=\"post\">"); print("<input type=\"hidden\" name=\"sid\" id=\"sid\" value=\"" . $sid . "\">"); print("<input type=\"hidden\" name=\"catid\" id=\"catid\" value=\"".$categoryId."\" >"); print("<input type=\"hidden\" name=\"subcatid\" id=\"subcatid\" value=\"".$subcategoryId."\" >"); print("<input type=\"hidden\" name=\"tabval\" id=\"tabval\" value=\"\" >"); print("<input type=\"hidden\" name=\"server_root\" id=\"server_root\" value=\"".$server_root."\" >"); print("</form>"); <input type="image" src=<?php print("\"" . $imgpath . "personal_finance_btn_over.gif\""); ?> name="Personal_fin" width="139" height="34" border="0" id="Personal_finance" value="1:Personal_finance" onclick="setCategory(this.value);" /> function setCategory(cateid) { usid=document.topPanelForm.sid.value; server_root=document.topPanelForm.server_root.value; category=cateid.split(":",2); cat=category[0]; id=category[1]; subcatgid=cat+"01"; document.topPanelForm.action=server_root+"/login/community.php"; document.topPanelForm.catid.value=cat; document.topPanelForm.subcatid.value=subcatgid; document.topPanelForm.tabval.value=cat; alert("sid "+document.topPanelForm.sid.value) //document.topPanelForm.submit(); document.getElementById("topPanelForm").submit();
Comment