NetTalk Central

Author Topic: html all the time  (Read 3441 times)

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
html all the time
« on: August 01, 2008, 04:00:23 PM »
The interesting problem I'm having is I am creating html so I can put in the tags for my procedures.. no problem doing that.. but, I can tell the program to call browse.html instead of just browse like from a menu and from a browse to a form or anywhere there is a place to call a URL.

But, many times when the program goes back, there is an assumption that is made and it calls the browse instead of the browse.htm.

What would be nice (and perhaps I don't know how to do it), is I setup in the browse (or form or whatever) the html version URL, so any calls made to that form or browse automatically attach the .htm. It could just be a checkmark and you just make sure that the html file is the same name as your procedure.

Anyway.. if there is a shortcut I'm missing, please let me know.

Thanks,

Ray Rippey
VMT Software

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: html all the time
« Reply #1 on: August 01, 2008, 10:32:22 PM »
Hi Ray,

I don't understand the question completely. But perhaps this will help.

In the web, you never go back. You only ever go forward. when you go from a browse to a form, you go forward. When you click on the Save button on the form, you go Forward (to the browse). And so on.

Sure you can set the URL for the save button to use, but I don't think this is your problem somehow...

Perhaps you could post a small example for us?

Cheers
Bruce

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: html all the time
« Reply #2 on: August 03, 2008, 01:38:23 AM »
Hi Ray,

Firstly, make sure your procedure names are not the same as your html page names.

When filling in template prompts in the browse procedure, for "Form Control Procedure", select the "Advanced" button and specify your html page name eg.  'myhtmlform.html' as opposed to 'formproc.htm'

In form template prompts for "URL on Save" and "URL on Cancel", specify your browse html page eg. 'myhtmlbrowse.html' as opposed to 'browseproc.htm'

If you want to retry a form, you would specify your html page as opposed to your form procedure eg. in ValidateUpdate embed, instead of doing:

  p_web.SetValue('retry','formproc.htm')

you would do:

  p_web.SetValue('retry','myhtmlform.htm')

Hope that helps

Regards
Graham

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: html all the time
« Reply #3 on: August 04, 2008, 12:51:15 PM »
Perhaps my mistake is calling my html the same name as the procedures.

The point I was trying to make is this: Let's say I create a nice html page and add the tags to it. Now I have to go into the procedure and change all my URLS that call this procedure to the name of my html page.. and I have to go into the embeds to make sure when it retries it is calling my html. Plus any other procedures that call this procedure must be changed to call the html instead... a lot of work.

I've only dabbled in templates... but would it be possible to perhaps store an html url in the procedure that when the procedure gets called, it automagically calls the html page instead?

Or... maybe even have a global table that when the program compiles it puts in the name of the html instead...

That being said... I have found in some cases where I am just calling the procedure like normal... things work great. In this case I have a range filtered browse.. which is a form with a drop down ... and it refreshes the browse just fine.. until I have it call the browse.html. Then it doesn't refresh correctly when I choose a new dropdown.

I will try renaming my html pages to something different than the names of the procedures... I didn't know that was a problem, but it kind of makes sense.

Thanks,

Ray
VMT

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: html all the time
« Reply #4 on: August 05, 2008, 03:53:27 PM »
Well, changing the names of my html pages didn't work. I renamed them all to procedurename_h.htm for clarity.

I have a procedure that manually checks the validity of a reservation. If it is not OK to reserve, I call a reservebad procedure which is a webform with a browse attached (or called) in the templates. This works great. I am using the retry to make it work....

This is in validate insert start (I am always inserting).

  Get(RESERVE,0)
  If Duplicate(RES:RID_RESKEY)
    loc:Invalid = 'RES:RESERV_DATE'
    loc:Alert = clip(p_web.site.DuplicateText) & ' RID_RESKEY --> '&clip('Reserv date:')&', '&clip('Rentid:')&''
    loc:reserve_error=1 !set reserve error in reservebad for Already Reserved
    p_web.SetSessionValue('reservestatus',loc:reserve_error)
    p_web.SetValue('retry','reservebad')
    exit
  .

(this is the code to see if the reservation exists for today already)... I also have code that checks for the # of reservations for this customer... so it can pass a different error to the reservebad procedure.

Anyway, I made an html page called reservebad_h.htm. So, I thought I could call
p_web.SetValue('retry','reservebad_h.htm')
instead of
p_web.SetValue('retry','reservebad')

But I get a page not found.

I know the reservebad_h.htm works because if I call it directly it shows the page and lists the reservations. reservebad is just an error page that shows the error and has a browse of the current reservations for this customer.

Any hints?  ???

Thanks,

Ray Rippey
VMT Software

Here is the actual reservebad_h.htm code with the tags:

<!-- NetWebServer -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Net:c:Head -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Reservation Problem</title>
<style type="text/css">
.oopstyle {
   font-size: large;
   font-weight: bold;
   font-style: normal;
   border-style: double;
   border-color: #FF0000;
}
</style>
</head>
<body>
<table style="width: auto; color: #00FF00;" cellspacing="3" cellpadding="3" align="center" class="oopstyle">
   <tr>
      <td>
<center><!-- Net:reservebad --></center></td>
   </tr>
</table>
<!-- Net:c:BodyEnd -->
</body>

</html>

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: html all the time
« Reply #5 on: August 11, 2008, 10:26:15 PM »
Hi Ray,

In the browser, if you right-click on the error window, and choose Source (View Source), then you should be able to see the name of the file it was asked for.

In which directory is your reservebad_h.htm page?

Cheers
Bruce

rayrip

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: html all the time
« Reply #6 on: August 13, 2008, 01:07:17 PM »
OK, I got it working:

p_web.SetValue('retry','web\reservebad_h.htm')

I had to put in the web\ in order for it to work. Curious because I don't have to put a \web in any other URL that calls my html tagged pages?

It was the path all along.

Thanks Bruce.