Hi,
I have a subform with 1 white row.
In my sql I order on date DESC.
So the last input always is on top of the subform. (and now the blank row is at the bottom)
But how can i set my blank row on top of the subform?
Johan
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Blank rows on top of subform
Re: Blank rows on top of subform
Johan,
You can't, unless you insert them into the table before the Form loads.
You could also get JavaScript to scroll down to the the first blank record (if you are trying to make it easy to add new records).
Steven
You can't, unless you insert them into the table before the Form loads.
You could also get JavaScript to scroll down to the the first blank record (if you are trying to make it easy to add new records).
Steven
Re: Blank rows on top of subform
Steven,
When I don't order DESC the last input will come at the bottom of the subform. It could be an option to jump automatic to first (only) blank record with javascript? Can you help me on that?
In that case the user has to scroll up for history.
Thanks again,
Johan
When I don't order DESC the last input will come at the bottom of the subform. It could be an option to jump automatic to first (only) blank record with javascript? Can you help me on that?
In that case the user has to scroll up for history.
Thanks again,
Johan
Re: Blank rows on top of subform
Johan,
Try this..
Steven
Try this..
Code: Select all
function nuLoadThis(){
var rows = nuSubformRowArray('artist');
for(var i = 0 ; i < rows.length ; i ++){
var fld = document.getElementById(rows[i] + 'art_comments');
if(fld.value == ''){ //-- go to first blank item (row)
fld.focus();
return;
}
}
}
Steven
Re: Blank rows on top of subform
Steven,
I've replaced 'artist' by the name of my subform and art_comments by the field I want to look in but nothing happens.
Probebly I'm doing something wrong.
Any suggestion?
Johan
I've replaced 'artist' by the name of my subform and art_comments by the field I want to look in but nothing happens.
Probebly I'm doing something wrong.
Any suggestion?
Johan
Re: Blank rows on top of subform
Steven,
I've tried to debug it but I get no result in zzsys_trap. I wanted to look at the tutorial but on clicking it I have to log in on the site. Ofcourse I don't have acces to that area.
Johan
I've tried to debug it but I get no result in zzsys_trap. I wanted to look at the tutorial but on clicking it I have to log in on the site. Ofcourse I don't have acces to that area.

Johan
Re: Blank rows on top of subform
Johan,
Firstly send me the wiki link that you can't get in to and I'll get it fixed for you (sorry about that).
Secondly, JavaScript will give no results in zzsys_trap.
nuBuilder has a nuDebug() function for use in both JavaScript and php, with javascript's results will be outputted to a new browse window, and php's will be inserted into the table zzsys_trap.
The fact that you are not getting a window pop up means that you probably have a syntax error somewhere in your JavaScript and no JavaScript is running. To figure out where, comment out all the JavaScript code, slowly adding it back in and running it until something works.
Steven
Firstly send me the wiki link that you can't get in to and I'll get it fixed for you (sorry about that).
Secondly, JavaScript will give no results in zzsys_trap.
nuBuilder has a nuDebug() function for use in both JavaScript and php, with javascript's results will be outputted to a new browse window, and php's will be inserted into the table zzsys_trap.
The fact that you are not getting a window pop up means that you probably have a syntax error somewhere in your JavaScript and no JavaScript is running. To figure out where, comment out all the JavaScript code, slowly adding it back in and running it until something works.
Steven
Re: Blank rows on top of subform
Steven,
There are several tutorials where the link does'nt work. I'm sure about tutorial 12 - 13 (http://wiki.nubuilder.com/tiki-index.ph ... uilderDocs and 15. I haven't checked the rest.
Johan
There are several tutorials where the link does'nt work. I'm sure about tutorial 12 - 13 (http://wiki.nubuilder.com/tiki-index.ph ... uilderDocs and 15. I haven't checked the rest.
Johan