Jump to content

Search the Community

Showing results for tags 'trigger'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. SkyGate07

    Password Popup

    I cannot share a link for this due to the confidentiality of the website, but hopefully my ask is fairly simple to answer. I have a landing page with links to certain pages with visibility set to PRIVATE. Of course, if someone clicks a private link, the are redirected to a password page. If they enter the correct password, it reveals the page. Here’s my question: I need a solution for the link to the private page that triggers a popup password entry. This is not a membership site. There will be no roles or usernames. I want the functionality as it is but I don’t want the visitor redirected to a password page… I want the link to trigger a password entry popup. Is this doable? Surely there’s a plugin for this, but I cannot find it.
  2. <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style type="text/css">.sectionseparator { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 0px;}.sectionseparator:hover { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 101px;}.sectionseparator.open { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 27px;}.sectionseparator.open:hover { background-image:url(/asset/image/accordion_icon_sprite.png); background-position:0px 64px;}</style><script language="javascript" type="text/javascript">function imgHover(o){ //what script shoud I put here??};function showHideInfo(o){ //Don't worry about this. Already done.};</script></head><body><a id="section-spg" href="#" onClick="showHideInfo(this);" onMouseOver="imgHover(this);"><img id="section-spg-img" src="/asset/image/invis.gif" width="27" height="27" class="sectionseparator" style=" position:absolute;margin-top:5px;"> <div style="display:inline-block; position: relative; top:6px; left:35px;">SPG</div></a><div id="spg-info">SPG Info</div></body></html> I want background image of 'section-spg-img' changed as 'sectionseparator:hover' when I hover mouse in any region within 'section-spg'. I've searching and try every event method. Either I'm stupid enough and failed or I'm not understand anything about event. Image sprite contain {+,hovered +, -, hovered -}. showHideInfo() change either + or - of the image and show or hide 'spg-info'. (success) imgHover() change either hovered + or hovered - of the image. (failed) Example : http://www.microsoft.com/en-us/download/details.aspx?id=30653 (Detail, System Requirement, etc...) I don't wanna use jQuery. Thank you.
  3. I have Table2 with a foreign key to Table1. I want to create a trigger that automatically update Table2 when Table1 is updated. Here is what's on my mind: create trigger MyTrigger on Table1 instead of update asif UPDATE(Table1_ID)begin declare @OldID as int, @NewID as int; select @OldID=P_ID from deleted; select @NewID=P_ID from inserted; update Table2 set Table1_ID=@NewID where Table2.Table1_ID=@OldID; update Table1 set Table1_ID=@NewID where Table1_ID=@OldID;end I received an error from SQL Server indicating that there was a conflict with the foreign key constraint when I tried to update a row. So I modified it a bit: create trigger MyTrigger on Table1 instead of update asif UPDATE(Table1_ID)begin declare @OldID as int, @NewID as int; select @OldID=P_ID from deleted; select @NewID=P_ID from inserted; update Table2 set Table1_ID=null where Table2.Table1_ID=@OldID; update Table1 set Table1_ID=@NewID where Table1_ID=@OldID; update Table2 set Table1_ID=@NewID where Table1_ID=null;end It does work. But pre-existing null values from Table2 are obviously lost if the trigger runs. What is the correct way to do this? Note that I already know of the cascading option when creating table. I just want to do it using trigger. Thanks. Note: I don't know how to loop through the inserted and deleted tables when multiple rows are updated. I'm assuming 1 row is updated at a time.
  4. Background: According to the W3Schools webpage the "rel" attribute should only be used with the <a> tag when the "href" attribute is present. In contrast, the "rel" attribute is used in jQuery Tools with the <img> element and the "src" attribute. There is an obvious contradiction here. Question One: Just how flexible is the "rel" attribute? Can it be used with any HTML element that refers to a link? If not, just what are its exact limitations? Question Two: Is it possible to reconfigure jQuery Tools dynamically so that an attribute other than the "rel" attribute can be used in the absence of an HTML tag with a linked document? How would one go about it? A former W3Schools regular,Roddy (Kiusau)
  5. The following code works as intended when a page is loaded with the defined elements, but does not if it is to be called on a MVC partial view rendering. I understand why it doesn’t is because the page has already loaded but the elements this code acts on have not been loaded. I have tried referencing the source of the code in the partial view .ascx file and have also tried loading the code within script tags: these do not work. Any help on how I can get this to work on a partial view/page update would be appreciated. Sliding.js // This is a reduced accordion effect on div class hideableItem elements.//$(document).ready(function () {// $('.itemHeader').click(function () {// In order to get this to work with a partial page update I had to remove the above two lines and// compliment closing brace & parenthesis, then add the following line.$('.itemHeader').live('click', function () { // Get the parent of the item that was previously clicked. var priorSelectedParent = $('.itemHeaderSelected').parent().attr('id'); $('#' + priorSelectedParent + ' .hideableItem').slideUp('fast'); $('#' + priorSelectedParent + ' .itemHeaderSelected').addClass('itemHeader'); $('#' + priorSelectedParent + ' .itemHeader').removeClass('itemHeaderSelected'); // Get the parent of the item that was clicked. var headerParent = $(this).parent().attr('id'); $('#' + headerParent + ' .hideableItem').slideDown('slow'); $('#' + headerParent + ' .itemHeader').addClass('itemHeaderSelected cornersRoundSmall'); $('#' + headerParent + ' .itemHeaderSelected').removeClass('itemHeader'); })//}); // On pages that utilize the accordion effect this causes the div class openingHeader// to open after the page loads.$(document).read(function () { $('.hideableItem').hide(); // Needed to add a slight time delay before triggering the click event. setTimeout(function () { // Select the openingHeader section be open after the page loads. $('.openingHeader').trigger('click'); }, 10);}); Background.ascx file where Sliding.js is to be implemented (shortened for brevity). <script type="text/javascript" src="../../Scripts/Sliding.js"></script> <h2 class="contentTopElement"> Background Information</h2> <div id="slidingPartial" class="slidingInfo cornersRoundSmall"> <div id="summary"> <h3 class="itemHeader openingHeader">Summary of Qualifications</h3> <div class="hideableItem"> <p> Established a...</p> <p> Ability to...</p> </div> </div> <div id="achievements"> <h3 class="itemHeader">Achievements</h3> <div class="hideableItem"> <p> Quality Control...</p> <p> USDA Service…</p> </div> </div></div> Index.aspx file that calls various partial views. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script> <script type="text/javascript" src="../../Scripts/Sliding.js"></script> <div class="relativeWrapper"> <div id="leftColumn"> <ul class="sideMenu"> <li class="selectionItem"><%= Ajax.ActionLink("Introduction","Introduction",new AjaxOptions{UpdateTargetId="columnContent"}) %></li> <li class="selectionItem"><%= Ajax.ActionLink("Background","Background",new AjaxOptions{UpdateTargetId="columnContent"}) %></li> <li class="selectionItem"><%= Ajax.ActionLink("Contact","Contact",new AjaxOptions{UpdateTargetId="columnContent"}) %></li> </ul> </div> <div id="rightColumn"> <div id="columnContent"> <%= Html.Partial("Introduction", new AjaxOptions { UpdateTargetId = "columnContent" })%> </div> </div> </div></asp:Content> Thanks,Ken
×
×
  • Create New...