Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats the name of the server?

Status
Not open for further replies.

DerStephan

Programmer
Aug 19, 2003
54
0
0
DE
Hallo again ;)

Ok I have a page in my web-aplication and on this page I have an action button that computes and calls an URL:
Code:
database := @ReplaceSubstring(@Subset(@DbName; -1);"\\";"/");
server := @Name([CN]; @Subset(@DbName; 1));
url:="[URL unfurl="true"]http://"+server+"/"+database+"/all/$searchForm?SearchView";[/URL]
url

It works fine, well not realy ;)

the only problem is @DbName

It's computet on server side, so for the server the server is localhost and @DbName gives me a NULL-String for the server name, but how to get the right name of the server?
It can't be that difficult.... I hope ;)

Thanks in advance


Stephan
 
Not difficult it is, you just need a CGI variable instead of @dbname.
Put a field in your form named Server_Name. In the browser, it will automatically be filled with the name of the server via CGI, and you can use that in your formula.
Look up CGI variables in your Designer Help for more info.

Pascal.
 
Hi Pascal,

My problem is, that I have a page....

But I will try to use a form

I already thought of using cgi variables but on poages it wouldn't work ;)

But a form is also a page, or? ;)

strange workaround


Regards


Stephan
 
Silly me. I didn't read the word "page" correctly.
OK, field won't work.
Hmmm, using Java could work, but your button would need to be coded in Java instead.
If you do that, you could load the server_name in the OnLoad event (defined in a variable for the frame), then call that variable in the button code.
I think that could work.

Pascal.
 
Ok I didi it with a Form it works fine.
hope no one will ever save this frame ;)

but thanks


Stephan
 
Use the SaveOptions field in the form, or better yet, go to the QuerySave event and put
Code:
Continue=False
.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top