Jump to content

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

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

? I think i'm misunderstanding you, can you explain a little better

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.

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.