Jump to content

Remove Form Tags When Calling Renderpartial In Yii


teng84

Recommended Posts

see if you can use any of this code to try to do what you want.. i didnt understand to well

 

<style type="text/css">
span.About {
  background:url(images/ABOUT.png) top center no-repeat;    

   display:block;
   height:26px;
border:none;



}
span.AboutMore {
  background:url(images/ABOUT.png) top center no-repeat;    

   display:block;
   height:26px;
border:none;



}
</style>
<?
$checked = "checked";



if (!empty($_POST['newClient']))
{
echo '$checked'; 
?>
<input name="newClient" type="radio" id="id_radio1" value= "check1" checked="<? $checked ?>"  onclick="javascript:Function_Name();"/>  New Client
<?
}
else
{
?>
<input id="id_radio2" type="radio" value= "check2" name="returningClient"  checked="<? $checked ?>" onclick="javascript:Function_Name_2();"  />Returning Client
<?
}


?>




<br />
THIS IS MY DROP DOWN MENU TO DISPLAY.<br />


<select>
<option>Seleccionar</option>
<option value="Casa" onclick="javascript:Function_Name();"><a href="#">New Client</a></option>
<option value="Casa" onclick="javascript:Function_Name_2();"><a href="#">Returning Client</a></option>
</select><br />



THIS IS MY BUTTON TO DISPLAY MY FUNCTION BLOCK!<br />
<!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM-->
<span class="About"  onclick="javascript:Function_Name();"><a href="#"></a></span><br />


<!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM-->
<span class="AboutMore"  onclick="javascript:Function_Name_2();"><a href="#"></a></span><br />


<div id="myfuction" style="display: none;padding: 5px;">
THIS IS MY FUCTION TEST BLOCK I WANT TO DISPLAY! NEW CLIENT

</div>
<div id="myfuction_2" style="display: none;padding: 5px;">
THIS IS MY FUCTION TEST BOCK 2 I WANT TO DISPLAY!  RETURNING CLIENT
</div>
<script type="text/javascript">
function Function_Name() 
 {
  if(document.getElementById('myfuction').style.display=='none')
  {
   //THIS IS SHOWING THE DIV TAG 
           div = document.getElementById('myfuction');
           div.style.display = "block";

  //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE
  div = document.getElementById('myfuction_2');
           div.style.display = "none";


  }
  else
  {
   //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS 
   div = document.getElementById('myfuction');
           div.style.display = "none";
  }

       }
 function Function_Name_2() 
 {
  if(document.getElementById('myfuction_2').style.display=='none')
  {
   //THIS IS SHOWING THE DIV TAG 
           div = document.getElementById('myfuction_2');
           div.style.display = "block";
  //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE
  div = document.getElementById('myfuction');
           div.style.display = "none";


  }
  else
  {
   //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS 
   div = document.getElementById('myfuction_2');
           div.style.display = "none";
  }

       }
</script>

Link to comment
Share on other sites

Well couldn't he place the form tags in a div tags

 

he has 4 forms tags and he wants to put it all in one? I think that's what hes saying.

 

How can i remove the form tags when i call the form by renderPartial? I have 4 forms from dixx views and i want to combine them into one sinlge form so when i cal render partial form tags should not be included.

 

thanks in advance

 

 

<form id="one">

</form>

 

<form id="two">

</form>

 

<form id="three">

</form>

 

<form id="four">

</form>

 

i say if statements

 

is it php?

 

it has to be simple. but I don't see any code to understand what hes doing.

I would just call the tag when i need it, and if it changes call another.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.