Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // addLoadEvent(setupstuff);
- // function addLoadEvent(func)
- // {
- // var oldonload = window.onload;
- // if (typeof window.onload != 'function')
- // {
- // window.onload = func;
- // }
- // else
- // {
- // window.onload = function ()
- // {
- // if (oldonload)
- // {
- // oldonload();
- // }
- // func();
- // };
- // }
- // }
- var txtLocation = '<%=txtLocation.ClientID%>';
- // JQuery plugin - JQueryLive (waits for element)
- $('#' + txtLocation).livequery(function ()
- {
- setupstuff();
- });
- //$(document).ready(function () //didn't work
- //$(window).load(function() //didn't work
- function setupstuff()
- {
- // search text watermark toggling
- var hasWatermark = $('#' + txtLocation).hasClass('txtLocationWatermark');
- var searchText;
- if (document.getElementById(txtLocation))
- {
- searchText = document.getElementById(txtLocation).value;
- }
- else
- {
- alert('Element ' + txtLocation + ' not found in DOM!');
- return;
- }
- //var searchText = $('#' + txtLocation).val(); //doesn't work either
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement