Results 1 to 2 of 2

Thread: redirect

  1. #1
    Join Date
    Jun 2012
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default redirect

    i am trying to add a mini calendar to module on my website but was just wondering if there is a way that when they click on a specific date it will redirect to for example:

    HTML Code:
    http://localhost/mywebsite/index.php?app=history&module=view&section=view&do=searchevent&date=9/12/2012
    HTML Code:
    <script type="text/javascript">
    	window.onload = function(){		
    		g_globalObject2 = new JsDatePick({
    			useMode:1,
    			isStripped:true,
    			target:"div4_example",
    			cellColorScheme:"beige"			
    		});
    
    		g_globalObject2.setOnSelectedDelegate(function(){
    			var obj = g_globalObject2.getSelectedDay();			
    		        window.location.href = "http://www.ezineasp.net+obj.day  "/"  obj.month  "/"  obj.year";  
    			document.getElementById("div3_example_result").innerHTML = obj.day + "/" + obj.month + "/" + obj.year;
    
    		});			
    		
    	};
    </script>
    i am using this calendar http://javascriptcalendar.org/

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Have you tried including the correct domain and query strings in the function call?

    It looks like it will work but the sample link you provided looks nothing like the window.location.href in the function.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. ip redirect
    By gatloc in forum JavaScript
    Replies: 2
    Last Post: 12-28-2010, 12:13 AM
  2. Redirect or other
    By bluewalrus in forum HTML
    Replies: 4
    Last Post: 03-29-2009, 03:47 PM
  3. Redirect if IE?
    By Moglizorz in forum PHP
    Replies: 10
    Last Post: 09-07-2008, 10:53 AM
  4. Redirect
    By pssparkman in forum HTML
    Replies: 4
    Last Post: 03-04-2008, 12:15 AM
  5. Redirect
    By Freeman in forum HTML
    Replies: 1
    Last Post: 12-13-2005, 05:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •