Tom Knowlton
asked on
Determine if tag contains certain parameter
<form method="post" action="Asset.aspx?MenuId= 409&As setTaskID= 2841409-1& amp;AssetI D=34878-1& amp;IsPopu p=true"
vs
<form method="post" action="Asset.aspx?MenuId= 396&As setID=3487 8-1" id="frmMain" enctype="multipart/form-da ta">
I want to know if the <form /> tag contains the "IsPopup" parameter and do something if it does / does not.
vs
<form method="post" action="Asset.aspx?MenuId=
I want to know if the <form /> tag contains the "IsPopup" parameter and do something if it does / does not.
indexOf not insexOf.
ASKER
Okay.
Now, what if I do not want to add attribute "id". Can it still work?
I do not want to disturb the way the form tag is currently rendered.
Now, what if I do not want to add attribute "id". Can it still work?
I do not want to disturb the way the form tag is currently rendered.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My final solution:
Thank you for your help!! : )
if ($("form#frmMain").attr('action').indexOf('IsPopup') < 0) {
$('input').attr('disabled', true);
$('select').attr('disabled', true);
$('div[id*="divSave"]').css('display', 'none');
$('span[id*="spnCalculateTotals"]').css('display', 'none');
}
Thank you for your help!! : )
if($("#myForm").attr('acti
}