ReplaceContentInContainer passing php parameter...

Javascript coding ..

Moderators: macek, egami, gesf

lewbram
New php-forum User
New php-forum User
Posts: 2
Joined: Wed May 11, 2011 4:58 am

ReplaceContentInContainer passing php parameter...

Postby lewbram » Wed May 11, 2011 5:09 am

Hi Guys ,

I am trying to use the ReplaceContentInContainer method to update part of a web page. I wish to pass a php includes rather than just text.
Is this possible or is there another way around this?

Code: Select all


<script type="text/javascript">
function ReplaceContentInContainer(id,content) {
var container = document.getElementById(id);
container.innerHTML = content;
}
</script>

<a href ="javascript:ReplaceContentInContainer('rightDiv',' <?php include('change_something.php')?>')">Change something</a>



Would be grateful for any advice.

Thanks

lewbram
New php-forum User
New php-forum User
Posts: 2
Joined: Wed May 11, 2011 4:58 am

Re: ReplaceContentInContainer passing php parameter...

Postby lewbram » Wed May 11, 2011 5:11 am

sorry I forgot to mention the php echo's a simple HTML form , is work fine when just using echo for a string.


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 0 guests

cron