#1 (permalink)  
Old 06-02-09, 03:35 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
Hazard JQuery

I was wondering how to use JQuery to write a script to make a window that I can move around/resize kinda like windows windows.. if that makes since...
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-10-09, 01:52 AM
coolsaggu's Avatar
coolsaggu coolsaggu is offline
Newbie Coder
 
Join Date: Jun 2008
Location: New Delhi, INDIA
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
By window, I hope, you mean to say that you want to drag around a container. Am I right???

If yes then you can use the jQuery Draggable plugin to write a script.
__________________
[ DEVELOPER - Dignity, Energy, Vision, Enthusiasm, Loyalty, Open-minded, Punctuality, Ex-telligence (extra intelligence), Respect ]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-10-09, 02:00 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
Yes, and what is this plugin?
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-10-09, 03:28 AM
coolsaggu's Avatar
coolsaggu coolsaggu is offline
Newbie Coder
 
Join Date: Jun 2008
Location: New Delhi, INDIA
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
The jQuery UI Draggable plugin makes selected elements draggable by mouse.

Its an extension of jQuery UI Library.

You can find the more information on this page.
UI/API/1.7.1/Draggable - jQuery JavaScript Library

and demo here
jQuery UI - Demos & Documentation

jQuery UI Home Page
jQuery UI - Home

I hope this would be helpful to you.
__________________
[ DEVELOPER - Dignity, Energy, Vision, Enthusiasm, Loyalty, Open-minded, Punctuality, Ex-telligence (extra intelligence), Respect ]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 06-14-09, 10:05 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
I found a site that has implemented what I want to do. Zipwhip
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 06-17-09, 03:48 PM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
So does anyone have any clue how to do something like this? Its for a staff application to manage my network.
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 06-18-09, 07:04 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
I have asked the developers of the above stated site and they have referred me to ExtJS, now my question is, how can I submit from a form on a javascript page and search a mysql database?

login.<acronym title="JavaScript">js</acronym>
PHP Code:

Ext.onReady(function(){

    
Ext.QuickTips.init();
 
    
// Create a variable to hold our EXT Form Panel. 
    // Assign various config options as seen.     
    
var login = new Ext.FormPanel({ 
        
labelWidth:80,
        
url:'login.php'
        
frame:true
        
title:'Please Login'
        
defaultType:'textfield',
    
monitorValid:true,
    
// Specific attributes for the text fields for username / password. 
    // The "name" attribute defines the name of variables sent to the server.
        
items:[{ 
                
fieldLabel:'Username'
                
name:'loginUsername'
                
allowBlank:false 
            
},{ 
                
fieldLabel:'Password'
                
name:'loginPassword'
                
inputType:'password'
                
allowBlank:false 
            
}],
 
    
// All the magic happens after the user clicks the button     
        
buttons:[{ 
                
text:'Login',
                
formBindtrue,     
                
// Function that fires when user clicks the button 
                
handler:function(){ 
                    
login.getForm().submit({ 
                        
method:'POST'
                        
waitTitle:'Connecting'
                        
waitMsg:'Sending data...',
 
            
// Functions that fire (success or failure) when the server responds. 
            // The one that executes is determined by the 
            // response that comes from login.asp as seen below. The server would 
            // actually respond with valid JSON, 
            // something like: response.write "{ success: true}" or 
            // response.write "{ success: false, errors: { reason: 'Login failed. Try again.' }}" 
            // depending on the logic contained within your server script.
            // If a success occurs, the user is notified with an alert messagebox, 
            // and when they click "OK", they are redirected to whatever page
            // you define as redirect. 
 
                        
success:function(){ 
                            
Ext.Msg.alert('Status''Login Successful!', function(btntext){
                   if (
btn == 'ok'){
                                var 
redirect './'
                                
window.location redirect;
                                   }
                    });
                        },
 
            
// Failure function, see comment above re: success and failure. 
            // You can see here, if login fails, it throws a messagebox
            // at the user telling him / her as much.  
 
                        
failure:function(formaction){ 
                            if(
action.failureType == 'server'){ 
                                
obj Ext.util.JSON.decode(action.response.responseText); 
                                
Ext.Msg.alert('Login Failed!'obj.errors.reason); 
                            }else{ 
                                
Ext.Msg.alert('Warning!''Authentication server is unreachable : ' action.response.responseText); 
                            } 
                            
login.getForm().reset(); 
                        } 
                    }); 
                } 
            }] 
    });
 
 
    
// This just creates a window to wrap the login form. 
    // The login object is passed to the items collection.       
    
var win = new Ext.Window({
        
layout:'fit',
        
width:300,
        
height:150,
        
closablefalse,
        
resizablefalse,
        
plaintrue,
        
borderfalse,
        
items: [login]
    });
    
win.show();
}); 
login.php
PHP Code:

<?PHP

defined
('__SNMS') or die(); //If not set kill session.
include("../common.php");
$loginUsername $_POST["loginUsername"];
$loginPassword $_POST["loginPassword"];
$fi=$loginUsername[0];    // Selecting the first letter of the username for $fi.
$fi=ucwords($fi);    // CAPSING the $fi.
$ln=substr($loginUsername1);    // Selecting the last name out of the username.
$ln=ucwords(strtolower($ln));    // CAPSING the first letter of the last name.
//echo "{success: false, errors: { reason: 'Login failed. Try again. Ref: Pass.' }}";

$db->query("SELECT f_name, l_name, pass FROM users WHERE l_name='".$ln."'");
while(
$li_row=$db->fetch_array()){
    
$dfi=$li_row['f_name'];
    if(
$dfi[0]==$fi){
        if(
$li_row['l_name']==$ln){
            if(
$li_row['pass']==md5($loginPassword)){
                 echo 
"{success: true}";
            }else{
                echo 
"{success: false, errors: { reason: 'Login failed. Try again. Ref: Pass.' }}";
            }
        }else{
            echo 
"{success: false, errors: { reason: 'Login failed. Try again. Ref: Last Name.' }}";
        }
    }else{
        echo 
"{success: false, errors: { reason: 'Login failed. Try again. Ref: First Init.' }}";
    }
}
?>
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 06-30-09, 04:05 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
Anyone have any ideas?
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 06-30-09, 10:40 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by connor View Post
I was wondering how to use JQuery to write a script to make a window that I can move around/resize kinda like windows windows.. if that makes since...
Try the DHTML Window kit:

http://www.dynamicdrive.com/dynamici...ndow/index.htm
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 07-22-09, 08:08 PM
dgreenhouse's Avatar
dgreenhouse dgreenhouse is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: San Francisco
Posts: 457
Thanks: 0
Thanked 3 Times in 3 Posts
I like a lot of the js frameworks out there, but for the 'quick and dirty' (and clean) UI widget dance, I'd recommend: script.aculo.us. Dojo's also good, Some of the stuff built on top of jQuery's great, but as stated, for pure simplicity script.aculo.us is probably the best. It has a lot of nice features that Thomas Fuchs put in.

Caveat... If you're already using jQuery you'll have to be very careful as script.aculo.us extends 'prototype' and there can be namespace collisions.

Fortunately, jQuery has a "no conflict" mode. (noConflict())

Last edited by dgreenhouse; 07-22-09 at 08:11 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery and Opera dgreenhouse JavaScript 2 04-25-09 03:36 AM
jQuery IP Validator cancer10 JavaScript 0 02-16-09 06:41 AM
jQuery - Redirecting a Page cancer10 JavaScript 2 08-02-08 03:35 PM
Jquery + ASP.NET.Crucial!!!!! highjo ASP.NET 3 07-21-08 12:07 AM
Ajax and jQUERY cancer10 JavaScript 1 06-25-08 01:56 AM


All times are GMT -5. The time now is 11:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.