×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Whats the name of the server?

Whats the name of the server?

Whats the name of the server?

(OP)
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:

database := @ReplaceSubstring(@Subset(@DbName; -1);"\\";"/");
server := @Name([CN]; @Subset(@DbName; 1));
url:="http://"+server+"/"+database+"/all/$searchForm?SearchView";
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

RE: Whats the name of the server?

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.

RE: Whats the name of the server?

(OP)
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

RE: Whats the name of the server?

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.

RE: Whats the name of the server?

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

but thanks


Stephan

RE: Whats the name of the server?

Use the SaveOptions field in the form, or better yet, go to the QuerySave event and put Continue=False.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close