close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using cancel button to redirect users

Thread began 12/03/2012 8:52 am by thehalpeen319342 | Last modified 12/05/2012 12:19 pm by thehalpeen319342 | 10172 views | 6 replies |

thehalpeen319342

Using cancel button to redirect users

Dear Jason
Question 1
How can I apply server behaviours to a button (say a ‘cance’l button) that will direct users to a page and it must work if the user has javascript disabled. I notice on your own site in the Update Account section userupdate.php there is a cancel button that works, even if javascript is disabled

I have used Dreamweaver onClick Tag Behaviour, but it doesn’t work if javascript is disabled.

Question 2
In my form created with CSS Form Builder how can I get a button or text to sit neatly beside the submit button – see attached buttons.pdf. The spans and list items are preventing me from doing this task.

Below is my code
<li class="formItem"> <span class="buttonFieldGroup" >
<input class="formButton" name="Clan_submit" type="image" id="Clan_submit" src="webassist/forms/fd_sharp_default/submit.gif" onclick="clearAllServerErrors('Clan_Sharp_Default')" tabindex="12" />
</span></li>
</ul>
</fieldset>
</li>
</ul>
&nbsp; &nbsp; <a href="welcomepage.php"><span>CANCEL</span></a>
</form>
</div>

Attached Files
buttons.pdf
Sign in to reply to this post

Jason ByrnesWebAssist

1) use a link around the cancel button:

<a href="page.php"><input type="button" name="cancel" id="cancel" value="Cancel"></a>


2) put the link code right after the button code:
<input class="formButton" name="Clan_submit" type="image" id="Clan_submit" src="webassist/forms/fd_sharp_default/submit.gif" onclick="clearAllServerErrors('Clan_Sharp_Default' )" tabindex="12" />&nbsp; &nbsp; <a href="welcomepage.php"><span>CANCEL</span></a>


rather than outside the LI tag that contains the button

Sign in to reply to this post

thehalpeen319342

Jason, your pretty good. Simple when you know how.

Having said that, the cancel button does not work (you just remains on the same page) in Explorer 9. It work in Firefox, and Chrome - you are directed to welcomepage.php.

See code and stylesheet below:
<li class="formItem"> <span class="buttonFieldGroup" >
<input name="Clan_submit" type="submit" class="Sharp2" id="Clan_submit" tabindex="12" value="Submit" onclick="clearAllServerErrors('Clan_Sharp_Default')" />&nbsp; &nbsp;
<a href="welcomepage.php"><input type="button" value="Cancel" class="Sharp2" id="Cancel" name="Cancel" /></a>



<style type="text/css">
.Sharp2 {
font-family: Arial, Helvetica, sans-serif;
text-transform: uppercase;
font-size: 12px;
color: #FFFFFF;
background-image: -moz-linear-gradient(top, #E70809, #AD0000);
background-image: -o-linear-gradient(top, #E70809, #AD0000);
background-image: -webkit-linear-gradient(#E70809, #AD0000);
background-image: -webkit-gradient(linear,left top, left bottom, color-stop(0, #E70809), color-stop(1, #AD0000));
background-image: linear-gradient(top, #E70809, #AD0000);
filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#E70809', EndColorStr='#AD0000', GradientType=0);
-ms-filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#E70809', EndColorStr='#AD0000', GradientType=0);
padding-top: 4px;
padding-right: 8px;
padding-bottom: 4px;
padding-left: 8px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 1px 1px 0px #000000;
-webkit-box-shadow: 1px 1px 0px #000000;
box-shadow: 1px 1px 0px #000000;
behavior: url(webassist/button_styles/ie-css3.htc);
}
.Sharp2:hover {
background-image: -moz-linear-gradient(top, #7E0000, #590000);
background-image: -o-linear-gradient(top, #7E0000, #590000);
background-image: -webkit-linear-gradient(#7E0000, #590000);
background-image: -webkit-gradient(linear,left top, left bottom, color-stop(0, #7E0000), color-stop(1, #590000));
background-image: linear-gradient(top, #7E0000, #590000);
filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#7E0000', EndColorStr='#590000', GradientType=0);
-ms-filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#7E0000', EndColorStr='#590000', GradientType=0);
}
</style>

Sign in to reply to this post

Jason ByrnesWebAssist

IE 9 wont work with buttons in links. you would need to use a standard link for compatibility with IE 9:
<a href="welcomepage.php">Cancel</a>

Sign in to reply to this post

thehalpeen319342

Ok, I can live with that - but how do WebAssist manage to get their cancel button to work in IE9 on the their update page userupdate.php?

Sign in to reply to this post

Jason ByrnesWebAssist

the cancel button on that page is not a form button, it is an image tag. the image used looks like a button.

Sign in to reply to this post

thehalpeen319342

ok - thanks!

Sign in to reply to this post

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