Problem with sending form

Topics: User Forum
Apr 22, 2015 at 11:31 AM
Hi friends!

I've a new problem with AVFP. I configured my app on my remote server and with standard url (server_hostname/app_directory/default.avfp) works fine. Now, i added a domain to my server and i've set a new IIS pool.

Now, my app is reacheable from my domain but when i click on any submit button of form, i get an error in destination url.
"JustPath(oProp.ScriptPath)" don't works in this case. I see, in the url address bar, only a partial path.

For example:

Original url that work: http://mydomain.com/control.avfp?code=12
Actual url: http:///control.avfp?code=12

This problem is only with domain, with standard address there isn't problem.

I need to use the domain name instead of "JustPath(oProp.ScriptPath)" ?
Coordinator
Apr 22, 2015 at 1:47 PM
Check you link. If you based this on the demo then your link looks like this:
<%=JUSTPATH(oProp.ScriptPath)+[/control.avfp]%>

You should have a link like this instead (note the dot before the backslash):
<%=JUSTPATH(oProp.ScriptPath)+[./control.avfp]%>
Apr 22, 2015 at 4:08 PM
apaustria wrote:
Check you link. If you based this on the demo then your link looks like this:
<%=JUSTPATH(oProp.ScriptPath)+[/control.avfp]%>

You should have a link like this instead (note the dot before the backslash):
<%=JUSTPATH(oProp.ScriptPath)+[./control.avfp]%>
Many thanks. Now works fine. :)
Aug 3 at 9:19 AM
Hi friends!
I've another problem like this. On my server i run different websites made with AVFP and all have working fine until this morning...
Now, i don't know why, all my websites (without domain) give me a "404" error when i do send webform or i do navigate to another page.

My url is like this:
http://myserver/web1./category.avfp?id=0001

The "dot" is been always interpreted by IIS that loads my page correctly. Now, instead, i get "404" error and i don't understand how it can be...

On my server, Windows Updates are disabled and there isn't app that are installed/uninstalled on it.

Can you giving me a help to solve my problem?
Coordinator
Nov 3 at 5:16 PM
Edited Nov 3 at 5:18 PM
This is what I do:

Before body element, y put this code (requires the extended version):
<script>
 var baseUrl = "@site@";    // @site@ is resolved automatically by AVFP
 function url(relUrl) {
   return baseUrl [plus] relUrl;
 }
</script>
In AVFP markup, I can use @site@ macro to reference the current site, ex:
<a href="@site@/mypage.avfp">My Page</a>
<script src="@site@/js/main.js"></script>
In javascript code, I can use url() function to achieve the same:
$.ajax({
  type: "GET",
  url: url("mypage.avfp")
});
Victor
Marked as answer by mr_ocean on 11/4/2016 at 4:59 AM
Nov 4 at 12:59 PM
Thanks Victor.
I solved with a re-installation of IIS service. Howevear, your answer can be useful for future problem like this.