New Posts  All Forums:Forum Nav:

Coding Question

post #1 of 11
Thread Starter 
I am looking to learn some code to create an event that will not load the header, footer and some other areas of a site. I am looking for a way that it will allow the visitor to believe they are on the same page and not actually going to other pages. Can someone direct me on where to go or what it is called please. Love to be able to do this in some Javascript
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #2 of 11
Quote:
Originally Posted by graphicsman View Post
I am looking to learn some code to create an event that will not load the header, footer and some other areas of a site. I am looking for a way that it will allow the visitor to believe they are on the same page and not actually going to other pages. Can someone direct me on where to go or what it is called please. Love to be able to do this in some Javascript
This is called Ajax, and it's way beyond the scope of a single forum post. A couple of places to start would be:

http://www.w3schools.com/ajax/ajax_intro.asp
http://www.ajaxtutorial.net/
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #3 of 11
Would definitely suggest the w3 link error10 threw out there, by far the best.
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
post #4 of 11
IMO those tutorials are useless. If you use the standard javascript way you are wasting time. Alot of time.

Look at:
http://jquery.com/
http://api.jquery.com/jQuery.ajax/
jQuery is a javascript framework that is used on pretty much any major website. I could probably bet $100 that more than 3/4 of the fortune 500 use jquery.

To learn the jQuery ajax methods I would suggest:
http://net.tutsplus.com/tutorials/ja...s-with-jquery/
http://sixrevisions.com/javascript/t...ery-with-ajax/
http://www.devirtuoso.com/2009/07/be...x-with-jquery/

It would also be good to read up on how data is transferred. Usually its JSON, but XML and SOAP are also used sometimes.
Dink
(20 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core I5 3570K Gigabyte UD3H Sapphire 7950 GSkill Ares 16gb 
Hard DriveOptical DriveCoolingOS
Samsung 840 500GB None Swiftech H220 Windows 7 Ultimate 
MonitorMonitorMonitorMonitor
Crossover 27" 27Q Acer 23" V233H Hanns-G 24" HH241 LG 55" LD520  
KeyboardPowerCaseMouse
Ducky Shine2 DK9008 with Reds Seasonic X750 Gold NZXT Switch 810 Mionix Naos 8200 
Mouse PadAudioAudioAudio
Mionix Ensis 320 LR: Focal 726 Sub: HSU VTF15-H Denon AVR1911 
  hide details  
Reply
Dink
(20 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core I5 3570K Gigabyte UD3H Sapphire 7950 GSkill Ares 16gb 
Hard DriveOptical DriveCoolingOS
Samsung 840 500GB None Swiftech H220 Windows 7 Ultimate 
MonitorMonitorMonitorMonitor
Crossover 27" 27Q Acer 23" V233H Hanns-G 24" HH241 LG 55" LD520  
KeyboardPowerCaseMouse
Ducky Shine2 DK9008 with Reds Seasonic X750 Gold NZXT Switch 810 Mionix Naos 8200 
Mouse PadAudioAudioAudio
Mionix Ensis 320 LR: Focal 726 Sub: HSU VTF15-H Denon AVR1911 
  hide details  
Reply
post #5 of 11
Doesn't sound like AJAX to me. I think he just needs to "hide" some parts of the page (DOM Manipulation or just plain CSS). jQuery is definitely a good suggestion for js framework, but stay away from the AJAX stuff as it will just confuse what you are trying to do.

You probably can achieve what you describe with a simple jquery click event handler ( or whatever event you are going to capture ) and a few lines of javascript and css.

Example:
If your markup is as follows, obviously greatly simplified:
Code:
<body>
<div id='header'>...</div>
<div id='page'> <a href="" id='event-button'>Click Me</a></div>
<div id='footer'>...</div>
</body>
For a click event you would just have a short snippet of jQuery code. This should hide the header and footer.
Code:
<script type="text/javascript">
 $(document).ready(function() {
    $("#event-button").click(function() {
       $("#header").css('display', 'none');
       $("#footer").css('display', 'none');
       return false; // If you don't want it to do default click action.
   });
 })
</script>
Didn't test this code, and you will probably have to modify it some to get where you want, but should be a good start point. If you give us some better description of what you are doing, may be able to help more.

BTW, don't forget to include the jQuery library before using any of the js code here.
White TITAN
(16 items)
 
   
CPUMotherboardGraphicsRAM
intel core i7-3770k Asus Z77 Sabertooth EVGA GTX 780 SC ACX Corsair Dominator Platinum 16GB (2x8GB) 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 840 Pro  WD Black Crucial M4 LG Blueray 
CoolingOSMonitorPower
Swiftech H220 (Stock cooler on while RMA :( ) Windows 7 64bit Dell 2311h Ultrasharp x 2 Corsair AX850 
CaseMouseMouse PadAudio
Fractal Design Define R4 White (w/ Window) Logitech G700 Razer Control Edition Sound Blaster ZxR 
CPUMotherboardGraphicsRAM
Intel 980x Asus Rampage iii Extreme EVGA GTX580 SLI Patriot Viper Xtreme 12GB DDR3 2000 (PC3 16000) 
Hard DriveHard DriveHard DriveOptical Drive
120GB Corsair Force Series 3 SSD WD Caviar Black 640GB Crucial M4 128GB SSD LG Black Blu-ray Drive SATA Model UH12LS28 
CoolingCoolingCoolingCooling
XSPC RX360 and RX120 Rads Watercool HeatKiller 3.0 Limited Edition Black ... XSPC Dual Bay Res with Swiftech MCP655 Pump Silver Shining Bitspower Compression Fittings 
CoolingCoolingCoolingCooling
PrimoFlex Pro LRT Black Tubing -1/2in. ID X 3/4in. 3x Gentle Typhoon 120mm Fan 1850RPM (AP-15)  1x Noiseblocker NB-BlackSilentPro PL-2 120mm Ul... Koolance VID-NX580 Full Cover GPU Waterblock x2 
OSMonitorKeyboardPower
Windows 7 Home Premium x64 Dell U2311 Ultrasharp x2 Max Keyboard Nighthawk X8 Semi-Custom - Mechani... Antec High Current Gamer 900W 
CaseMouseMouse PadAudio
Xigmatek Elysium Black Logitech G700 Razer Goliathus Creative Sound Blaster Recon3D Fatal1ty Pro 
  hide details  
Reply
White TITAN
(16 items)
 
   
CPUMotherboardGraphicsRAM
intel core i7-3770k Asus Z77 Sabertooth EVGA GTX 780 SC ACX Corsair Dominator Platinum 16GB (2x8GB) 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 840 Pro  WD Black Crucial M4 LG Blueray 
CoolingOSMonitorPower
Swiftech H220 (Stock cooler on while RMA :( ) Windows 7 64bit Dell 2311h Ultrasharp x 2 Corsair AX850 
CaseMouseMouse PadAudio
Fractal Design Define R4 White (w/ Window) Logitech G700 Razer Control Edition Sound Blaster ZxR 
CPUMotherboardGraphicsRAM
Intel 980x Asus Rampage iii Extreme EVGA GTX580 SLI Patriot Viper Xtreme 12GB DDR3 2000 (PC3 16000) 
Hard DriveHard DriveHard DriveOptical Drive
120GB Corsair Force Series 3 SSD WD Caviar Black 640GB Crucial M4 128GB SSD LG Black Blu-ray Drive SATA Model UH12LS28 
CoolingCoolingCoolingCooling
XSPC RX360 and RX120 Rads Watercool HeatKiller 3.0 Limited Edition Black ... XSPC Dual Bay Res with Swiftech MCP655 Pump Silver Shining Bitspower Compression Fittings 
CoolingCoolingCoolingCooling
PrimoFlex Pro LRT Black Tubing -1/2in. ID X 3/4in. 3x Gentle Typhoon 120mm Fan 1850RPM (AP-15)  1x Noiseblocker NB-BlackSilentPro PL-2 120mm Ul... Koolance VID-NX580 Full Cover GPU Waterblock x2 
OSMonitorKeyboardPower
Windows 7 Home Premium x64 Dell U2311 Ultrasharp x2 Max Keyboard Nighthawk X8 Semi-Custom - Mechani... Antec High Current Gamer 900W 
CaseMouseMouse PadAudio
Xigmatek Elysium Black Logitech G700 Razer Goliathus Creative Sound Blaster Recon3D Fatal1ty Pro 
  hide details  
Reply
post #6 of 11
Thread Starter 
thanxs guys, i was hoping it would be a simple jQuery event, just trying to figure out which one it was is the hard part. I dont mind going back to AJAX but it would be a mess. Needless to say it is written to run without any Javascript or jQuery in the event someone has the script disabled.
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #7 of 11
Quote:
Originally Posted by Irythros View Post
IMO those tutorials are useless. If you use the standard javascript way you are wasting time. Alot of time.
I disagree that knowing what's really going on is a waste of time.
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #8 of 11
Thread Starter 
lol
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #9 of 11
Quote:
Originally Posted by error10 View Post
I disagree that knowing what's really going on is a waste of time.
You must be one of those code nazis that prefer the old way of writing 100% everything from scratch vs using a mature project
The jQuery library is not encoded/encrypted. If he wants to learn what is going on, read that. But if it works to what is needed, then why bother reading the low-level parts? He's not google, and W3S is usually a waste of time on anything important.
Dink
(20 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core I5 3570K Gigabyte UD3H Sapphire 7950 GSkill Ares 16gb 
Hard DriveOptical DriveCoolingOS
Samsung 840 500GB None Swiftech H220 Windows 7 Ultimate 
MonitorMonitorMonitorMonitor
Crossover 27" 27Q Acer 23" V233H Hanns-G 24" HH241 LG 55" LD520  
KeyboardPowerCaseMouse
Ducky Shine2 DK9008 with Reds Seasonic X750 Gold NZXT Switch 810 Mionix Naos 8200 
Mouse PadAudioAudioAudio
Mionix Ensis 320 LR: Focal 726 Sub: HSU VTF15-H Denon AVR1911 
  hide details  
Reply
Dink
(20 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core I5 3570K Gigabyte UD3H Sapphire 7950 GSkill Ares 16gb 
Hard DriveOptical DriveCoolingOS
Samsung 840 500GB None Swiftech H220 Windows 7 Ultimate 
MonitorMonitorMonitorMonitor
Crossover 27" 27Q Acer 23" V233H Hanns-G 24" HH241 LG 55" LD520  
KeyboardPowerCaseMouse
Ducky Shine2 DK9008 with Reds Seasonic X750 Gold NZXT Switch 810 Mionix Naos 8200 
Mouse PadAudioAudioAudio
Mionix Ensis 320 LR: Focal 726 Sub: HSU VTF15-H Denon AVR1911 
  hide details  
Reply
post #10 of 11
Quote:
Originally Posted by Irythros View Post
You must be one of those code nazis that prefer the old way of writing 100% everything from scratch vs using a mature project
The jQuery library is not encoded/encrypted. If he wants to learn what is going on, read that. But if it works to what is needed, then why bother reading the low-level parts? He's not google, and W3S is usually a waste of time on anything important.
Because you need at least a basic understanding of JavaScript in order to use jQuery.
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding