...

View Full Version : Passing parameters



maganti.smurthy
01-24-2012, 04:36 AM
function viewDetails(rowid,linkid){


alert("enterining into bundles");
if(linkid=='seobundles')
{
alert("enetering into if ");
document.chwAnnouncementW.action='${contextPath}'+"/dolphin.wss/viewSeobundleW?rowindex="+rowid;
document.chwAnnouncementW.submit();






}

else
{

alert(linkid);
document.chwAnnouncementW.action='${contextPath}'+"/dolphin.wss/viewSeoW?rowindex="+rowid;
document.chwAnnouncementW.submit();
}


}



Actually i am passing linkid="seobundles" as string but its not interpreting and it is always going to else part and not if part. I tried to print link id its teling its of object HTML table type and we are passing the two parameters rowid, linkid from a macro. rowid is working fine as and when we select radio buttion but linkid is not working as an string. IF i pur linkid in single quotes then also its not working

Old Pedant
01-24-2012, 04:42 AM
If the alert(linkid) says it is an object, then the problem is that you are *NOT* passing an ID. You are passing the actual object.

So:


function viewDetails(rowid,link){

var linkid = link.id;
alert("linkid is " + linkid);

if(linkid=='seobundles')
{
... etc. ...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum