NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rob Mikkelsen

Pages: 1 [2] 3 4 ... 8
16
Web Server - Ask For Help / Re: Call form from Browse
« on: November 10, 2010, 04:52:29 PM »
Bill,

It appears that EventD:EventId is not being set as a session variable which accounts for the blank string being returned in your example.  The first line of your example:

'UpdateEvents?Event:SysID=' & p_web.GSV('EventD:EventID') & '&change_btn=change'

appears to be the correct call.  Remember, there is no syntax checking on the variable save, so if you saved it as p_Web.SSV('EventID:EventId') then read it as EventD:EventID then it would return the null string since the variable cannot be found - kind of like using intrinsic variables - exceedingly easy to fall prey to a typing error. 

What I do sometimes is to define it as a local variable, select it from the data table, and put quotes around it in the SSV and GSV statements.  That ensures that I always use the same variable name.

I suggest putting a couple debugview calls or STOP() statements in the code using "cut and paste" to put the same code in there (i.e., STOP(p_Web.GSV('EventD:EventId')) - one where you save the variable and one when you reload it to make sure that a) the value is being saved and b) you are using the same name.

Cheers!

Rob Mikkelsen

17
Bruce,

I thought that might be the case, but everything was set as handcoded.  Just to be sure, I looked solely at the embedded graph because there was very little handcoding in that.  I removed all embedded code from both the form and the graphing window except was was required to set the parameters for the graph, and even removed the value field refresh on date change.  Same result.  The graph displayed in the form (where expected) but was also duplicated AFTER the form.  Bizarre!  I found when I added the refresh calls back in that the embedded graph updated as dates changed but the duplicate graph was static.

I changed the entry type in the form from "Browse" to "Display" and entered the comment call '<!-- Net:DisplayDailyCount -->' as the text in the display field.  This worked, and still updates from the AJAX call to refresh the value so I am moving forward again; however, this is another thing to watch for when converting from NT4 to NT5.

I will try to modify your example to call the graphing via the browse call.  If I can duplicate the effect, I will send it to you so you can tell me where I went wrong! <g>

Rob

18
Web Server - Ask For Help / NT5 Duplicating WebSource Procedures on a Form
« on: November 08, 2010, 05:52:55 PM »
I am just getting into NT5 and am trying to overcome one issue that I am experiencing:

On a form, it was possible in NT4 to embed a WebSource procedure by dropping it on a form as a "browse" procedure, but NT5 displays the procedure both inside the form and after the form and associated buttons.  I have looked for additional calls to the WebSource but there are none.  This effect also occurs on an Insight Graphing procedure called the same way.

Has the process changed?  How do you insert WebSource procedures within a form in NT5?

Thanks!

Rob

19
UPDATE:  This anomaly occurs with Safari, but the field updating works fine with Firefox and IE6.  So - it appears to be nothing more than a browser problem.  Since the good folks in the FAA are locked into using IE6 this probably is not an issue.

It appears that in Safari when the value from the date picker is posted to the date entry screen, this is not sent to the server.  Is there a way to force that in server-side code?

20
I have an embedder form via a browse call (.jpg below) that I would like to auto-refresh when I select the date or airport.  The date change refreshes the form just fine if it is typed into the date field, but the form is not refreshed when the date is selected via the date picker.  

Is there a way to accomplish this, or should I just turn the date field into a string so it will always update the embedded form fields?

Thanks!

Rob


[attachment deleted by admin]

21
Bruce,

Yes - I understand that unchecked checkboxes will not be returned to the value queue.  The issue I have is the NONE of the checkboxes are returned to the value queue.

I will continue to work with it and let you know what I find.

Cheers!

Rob

22
Kevin,

Here is the code that I used.  It is not very dynamic at the moment, but I am planning to load it from a database after I get the functionality working.  This will allow anyone to set the fields they want to capture in the report and, eventually, set the order in which they appear.

Rob

[attachment deleted by admin]

23
Bruce,

They don't have to be dynamic inasmuch that a have to trigger code to accomplish something when a checkbox is selected/deselected - I just need to be able to refresh the group if the "select all" checkbox (a defined variable in the NT form) is checked.  I figured with the "select all" would be a variable in the form and the rest of the checkboxes would be in a source procedure that could be refreshed with one call instead of having to do 41 different resets.  However, when I call the source as  a browse procedure, I did not get any of the expected variables (checked boxes only - unchecked ones are not returned) back.

I decided to forego the "select all" reset and embedded the same source procedure in the "Generate Form / Tab / Field / After Row" embed which did return the expected results.

I will try this again and check to see if the data is available where the form is saved.  I have put STOP() messages in the RestoreMem, Post Update, PreUpdate, Procedure Setup and everywhere else I can think of but I cannot find the data in the value queue after posting the form.

I can create each field separately but I would prefer to be able to generate the checkboxes on the fly so I can change the order or number of fields if I need to in the future by updating the database and have everything flow from there.

Rob



24
NTWS 4 - This is a real newbie question but I cannot seem to make it work for me...

I have 41 checkboxes that obtain their data to a string and the checked boxes concatenate their check value (code) to create a new string when completed.

Rather than creating local variables for each, I have written a source procedure that builds the name for each variable dynamically based on its index (Check01 through Check41).  I insert that data into the NTWS form as a browse procedure called from the form.  The source code properly creates the table and it is displayed correctly in the browser.  When the form is submitted I cannot find the data returned in the value queue.

I found that simply embedding a source call to the routine to display the checkboxes returns the appropriate values in the value queue when I process the form, but when I use it as a browse call it does not return values.  I like the idea of being able to refresh the checkboxes via some trigger in NetTalk's AJAX processing, but I cannot find any values returned from the procedure when the form is submitted.

What am I missing?  How can I get the values from my embedded source called via the browse call in an NTWS 4.0 form to return values to the form?

Thanks!

Rob

25
Fantastic!  Just goes to show - you can't always believe what you read in books.  This should simplify things considerably.

Rob

26
Bruce,

At the risk of divulging my ignorance regarding Javascript, my understanding is that all Javascript required an event to trigger the functions.  In many cases, this is done via the <body onload="..."> command.  Is it possible to trigger Javascript code just by placing the code inline without tying it to an event?  All the references I have read tie it to an event.

Right now, I initialize the map object when the first field is selected which works but looks, to use the technical term, ugly.

On another note - is there a good Javascript editor available?  Right now, the only feedback that I get when I hose up my Javascript is that everything stops working.  Therefore, coding Javascript becomes a game of millimeters...  Change a line, recompile, make sure it doesn't break - change another line, etc...

Cheers!

Rob

27
NTWS 4

I am implementing Google geocoding and maps on my app.  In all the examples I have seen, a couple objects need to be initialized on a page load, and cleaned up when the page unloads.  I cannot find the <body onload=" embed on the form, and only the onload but not onunload on a page.

Where do I access the javascript to init and kill these objects?  Do I need to check to see if it is initialized and do so if necessary whenever an onchange() event is triggered?

Thanks!

Rob

28
Web Server - Ask For Help / Re: Buttons
« on: January 16, 2010, 09:25:04 AM »
Donnie,

I am not a NetTalk expert by any means, but this is what I found during my trial and error efforts.

EXECUTING CLARION CODE ON A PAGE

One thing to consider is that the Clarion code gets executed as the page loads; therfore, all decisions must be made before the page is created.  What I have done with some success is to link back to the same page and pass the event in the URL that I am trying to execute.  For instance, if I wanted to run the routine "Say Hello" then I would put the following on my button on the page (assuming that the button is on "indexpage"):

<form action="Indexpage" method="post"><input type="hidden" name="whatnow" value="sayhello" /><input type="submit" class="testbutton" name="Say Hello!" /></form>

Then on indexpage in the appropriate embed location, add the following:

IF CLIP(p_Web.GetValue('whatnow"))='sayhello' THEN
  DO SayHello
END!IF

In procedure routines, add the following code:

SayHello  ROUTINE
  packet=CLIP(Packet) & '<br />Hello there!'
  EXIT

If you need to retain the data longer than the first screen you must save it in the session queue because as soon as the page is delivered the thread ends and the value queue is deleted.  Since forms are a two pass, two thread process, I recommend writing the data to the session queue as soon as you read it.

Please do not take any of the code above as properly working code - I usually get the syntax of the submit button wrong.  It should, however, help you try to get your head wrapped around this web stuff.  The BIGGEST difference between web and app development is that unless you do some javascript programming, you need to know what you are going to do when you get to the page and that any input your program requires needs to be passed to another page for processing, but that page you pass it to could be the same page and interpreted as the page is being built.

PLACEMENT ON THE SCREEN

Bruce is correct - CSS is required to tweak the actual placement of an object on the screen (in addition to the order in which the HTML is generated).  However, this is not a real difficult task if you use the right CSS editor.

While some people like to use FireBug which is a free add-on tool to Firefox and works quite well, I prefer to use Stylizer from Skybound Software (http://www.skybound.ca).  It cleans your CSS code so every line is compliant, lets you easily create compliant CSS tags simply by pointing to the element you want to adjust, setting the specificity of the rule by clicking on the necessary parents and classes, and then clicking "add to rule".  The presentation adjusts automatically as you change the CSS for the screen.  It is pretty awesome and well worth the $89 cost of the software.  I believe they have a 30 day test period of the full functionality before it cripples itself to basic functionality, but I was so impressed I ordered it the first day I had it.

Good luck!

Rob

29
Web Server - Ask For Help / Re: Missing Button icons and alignment
« on: November 03, 2009, 08:28:16 PM »
My employer, the Federal Aviation Administration, insists on using IE6 for its 35,000+ employees.  There is a policy on the PCs that deletes all instances of Google Chrome and blocks the download of IE7 and IE8.  Fortunately I have admin rights, Firefox and Safari on my computer.

On a positive note, knowing that the bulk of my users WILL be using IE6 reduces the testing requirements considerably.

Cheers!

Rob

30
The HIDE condition creates the code but does not display it.  If you are not trying to change the code on the fly via AJAX then you can define what gets displayed in the INCLUDE condition.  As I understand it, the code here does not even get built if it fails the check.

I did this with one form and found that there may be a _slight_ space in the form, but nothing like using the "HIDE" condition.  Remember that the logic is reversed for this, but it may do the trick.

If that doesn't work, I agree that using a common memory variable to display and input the data would work, providing you put embedded code into the appropriate file fields would also do the job.

Rob

Pages: 1 [2] 3 4 ... 8