Forum Moderators: coopster

Message Too Old, No Replies

Using a submit button in a javascript/highslide popup

I need help about submitting content in a popup

         

Matthew needs help

6:01 pm on Jul 27, 2008 (gmt 0)

10+ Year Member



Hello All,

I would just like to say thanks for reading this!

I have a higslide/js popup which i am trying to use to edit content in a database, i can get the form to display, but when i click submit the variable i am using should turn true when the mysql has been sent. And when it turns true, the popups content should change to the latter half of the if clause. I have successfully done this in the past, but with a 'normal' javascript popup, well it generates a new window, but i saw the highslide stuff and thought ace - i'll have a bit of that!

this is the code that fires the popup:
return hs.htmlExpand(this, { contentId: 'highslide-html' } )"class="highslide" which works fine

and this is the div that populates said window:

<div class="highslide-html-content" id="highslide-html">
<div class="highslide-header">
<ul>
<li class="highslide-close">
<a href="#" onclick="return hs.close(this)">X</a>
</li>
</ul>
</div>
<div class="highslide-body">
<?php
if(!$AMEND)
{
?>
<form method="post" action="index.php?cmd=edit&amp;form=amend">
<input type="input"><br><br>
<input type="button" value="update text" class="formbutton" name="amend">
</form>
<?php
}
else
{
echo 'done';
}
?>
</div>
<div class="highslide-footer">
<div>
<span class="highslide-resize" title="Resize">
<span></span>

</span>
</div>
</div>
</div>

The idea is once the submit button is clicked the popup contents changes as the variable is changed to true, and the mysql is sent

Any help ideas is much appreciated.

Back to the BBQ now.

Cheers,

Matthew

PHP_Chimp

8:35 pm on Jul 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



highslide is not something that I have used, however your example doesnt look like there AJAX example. So you may want to check out there ajax-content area.

Hopefully that will give you a better idea of the problem.

[edited by: dreamcatcher at 9:40 am (utc) on July 31, 2008]
[edit reason] No urls please! [/edit]

Matthew needs help

9:02 pm on Jul 27, 2008 (gmt 0)

10+ Year Member



PHP_Chimp,

Thank you for the suggestion, i will see if i can put it to use.

Thanks,

Matthew

dreamcatcher

9:44 am on Jul 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The reason the form isn`t submitting is because you have:

<input type="button"

This requires a javscript directive to process. You should ideally have:

<input type="submit"

dc

Matthew needs help

8:46 pm on Jul 31, 2008 (gmt 0)

10+ Year Member



DC,

Aah, thanks for that, i must have typed it in wrong and not noticed! Just goes to show - you can look at something and think as you have took it in, but havnt.

Oh well - my page update sequence is now updating.

Matthew