close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Insert record only works in Safari

Thread began 11/11/2011 3:18 pm by iainmacdonald331081 | Last modified 11/15/2011 5:39 pm by iainmacdonald331081 | 712 views | 3 replies

Jason ByrnesWebAssist

different browsers handle the image input type differently.

with an image input type, you cant rely on the value for a trigger. some browsers will not pass the value as part of the form post for an image input type.

all browsers, though, will pass the x an y coordinates of where the image was clicked.

I cant speak to the Interakt code, I dont see where they reference the submit button as a trigger, but in the Web Assist code, triggers will be written directly as if statements.

when using a submit button type:

php:
<input type="submit" name="KT_Insert1" id="KT_Insert1" value="Post your query" />




the trigger code would be written as:

php:
if (isset($_POST["KT_Insert1"])) // Trigger

{





using an image input type of the same name:

php:
<input name="KT_Insert1" type="image" id="KT_Insert1" onmouseover="MM_swapImage('KT_Insert1','','images/buttons/post_enq uiry2.jpg',1)" onmouseout="MM_swapImgRestore()" value="Post your query"  src="../images/buttons/post_enquiry1.jpg" border="0" />



that code would work reliably on all browsers, so the webassist trigger code would be re written as:

php:
if (isset($_POST["KT_Insert1_x"])) // Trigger

{




to check for the x coordinates of where the image was clicked.



here's a fun test to illustrate the issue: Create a blank php page with a form on it, add 3 text boxes, a submit button and an image element

add the following code at the bottom:
<pre>
<?php var_dump($_POST); ?>
</pre>

this will write the entire contents of the post array to the page when it is submitted, test this in various browsers and you should see that most dont pass the image elements value, but they do pass the x and y coordinates of where the mouse clicked it.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...