Current location: Hot Scripts Forums » General Web Coding » JavaScript » Javascript nested functions


Javascript nested functions

Reply
  #1 (permalink)  
Old 10-27-11, 11:54 AM
titanit titanit is offline
New Member
 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript nested functions

Hello,

I wrote a php program all in HTML/PHP a few years ago for a non-profit. I'm giving it a face lift using new technologies for HTML/CSS/JQUERY/UI/PHP and I'm not much of a java person so I've hit a couple snags lol.

Basically, I have a new autocomplete text box that fills from a db. I have two links, view-grant, edit-grant, which when clicked on open different <span>'s lower on the page with either read-only view or editable text boxes. I need to submit the autocomplete (will submit back to same page and use php to deal with logic) input box to fill the variables in those spans though. Can I nest the show span function with the submit form function like below or is there a better procedure:

function submitform()
{
document.forms["myform"].submit();

function showStuff(id) {
document.getElementById(id).style.display = 'block';
}
}

auto-1.jpg

auto-2.jpg

Pics attached. Just want to make sure this is possible before I start all the php logic. Thanks for your input.
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
Firing of nested functions I_have_to_go PHP 4 04-17-10 05:59 AM
Senior JavaScript Developer - Full Time - Permanent - London AJAX, CSS, JSONP Chris Peacock Job Offers & Assistance 0 01-19-10 12:28 PM
Calculating Age Help jamesbuk PHP 9 03-07-09 01:21 PM
process two functions in javascript KamalRahman JavaScript 3 03-10-08 11:52 AM
JavaScript nested quotation marks... Clark_Kent JavaScript 2 05-03-06 04:05 PM


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