Jump to content

throw a form and redirect to another page: how?


adredz

Recommended Posts

If I have the code below, how would I modify it?

<div id="button_brief" alt="button_brief" onclick="location.href='http://localhost/form/';" style="cursor:pointer;"></div>

 

can I do it like this?

 

<div id="button_brief" alt="button_brief" onclick="location.href='http://localhost/form/';" style="cursor:pointer; <?php echo '<div>form here</div>"></div>

 

I tried it but it won't may be I am missing something?

 

pls help..

do you want to do this without reloading the page? if so you need javascript. It seems like you do want to do this as you mention the onclick attribute. You can call a javascript function that changes the innerHTML attribute of the div with your form.

 

something like

<script type="text/javascript" >
function change() {
div = document.getElementById('button_brief');
div.innerHTML = "your form here";
}
</script>

 

and call something like that in your onclick attribute.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.