Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 adding new menu to inc_header.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

minus
Starting Member

Turkey
8 Posts

Posted - 18 September 2004 :  07:06:23  Show Profile
I am a new member of snitzforums and working on it.Besides I am trying to learn asp.My question is that how can I add one more menu to right top the forum?.I have searched the forum and seen that inc_header.asp is responsible for this.But I have one more question.I want to send a value to another asp file and this file must be opened as 640X480 pixels.So I want to add a new menu at right top ,I want to send a value to asnother asp file and the file must be opened as 640X480...

Thanks :)

Edited by - minus on 20 September 2004 17:55:53

miperez
Junior Member

Spain
243 Posts

Posted - 20 September 2004 :  04:29:22  Show Profile
Hi, minus. I'll try to reply to your three questions:

1) The menu is created in the sForumNavigation() sub at the end of inc_header.asp. You would just need to add a new Response.write block with the menu you need.

2) In order to send a parameter to a page, you can just pass it in the URL. For instance, (if the target page is new_page.asp) you can call new_page.asp?parameter1=20¶meter2=C. Then, inside new_page.asp you can get the values using something like
param1=Request.querystring(parameter1)


3) You can use javascript to achieve that. In inc_header.asp, around line 260 you will find several lines defining "openwindowX" functions, where X is a number. What they do is opening a new window with different sizes and parameters, you can modify them or add a new one to create a window of the size you need.

Summaryzing, something similar to what you request is already done to invike the "profile" page in the menu, with this line:

		Response.Write	"    <a href=""javascript:openWindow3('pop_profile.asp?mode=Edit')""" & dWStatus("Edit your personal profile...") & " tabindex=""-1"">Profile</a>" & vbNewline & vbNewLine

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page

minus
Starting Member

Turkey
8 Posts

Posted - 20 September 2004 :  17:53:08  Show Profile
Thanx miperez. I have tried and I think I suceeded.But there is a problem.The thing that I am trying to send a value to another file.But the file is java based.I have made it asp file.So here are the codes.
::The function::
"function openWindow3(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _

--------------
::The Link::
Response.Write " <a href=""javascript:openWindow3('irc/index.asp?nick=" & strDBNTUserName & "')""" & dWStatus("ENTER CHAT...") & " tabindex=""-1"">CHAT</a>" & vbNewline & vbNewLine

:::The asp file (infact java file):::
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onUnload="document.JWIRC.sendFromJS('/QUIT Good luck all!')">
<center>

<!-- JWIRC applet begin-->
<applet NAME="JWIRC" CODEBASE="jwirc_files" ARCHIVE="jwirc_1_7_3.jar" code="IRC.class" width="100%" height="400">

<param name="ConfigFile" value="config.txt">

<param name="CABBASE" value="jwirc_1_7_3.bin">
<param name="Nick" value="<%=nick%>">

<param name="Password" value="******">
<param name="UserInfo" value="Myirc.com user">
<param name="Channels" value="#Myirc">
<param name="ServersString" value=
"
:Myirc ChanServ NickServ 6667!
64.18.138.21

">
</applet>
<!-- end of the JWIRC applet -->
</center>
</body>
</html>
---------------------------------------------
If you look carefully you will detect that I am trying to send the strDBNTUserName (users forum nick) to <param name="Nick" value="<%=nick%>"> java applets nick textbox.
I can see the variable (users nick) ast left bottom of my forum.But I cant see it in java..
Where is my mistake ???

Edited by - minus on 20 September 2004 17:57:20
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 21 September 2004 :  03:32:50  Show Profile
Hi, minus.

I think that, if you do <%=nick%> you are just capturing the value of a variable called "nick" in the ASP code, not the value of the nick parameter in the URL.

In order to do so, either you add a line like nick = Request.querystring('nick') at the beginning, and keep the rest of the code as is, or you modify your code to directly do this:

<param name="Nick" value="<%=Request.querystring('nick')%>">

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"

Edited by - miperez on 21 September 2004 03:34:55
Go to Top of Page

minus
Starting Member

Turkey
8 Posts

Posted - 21 September 2004 :  09:25:50  Show Profile
Thanx miperez.
I have applied the code but it didn't work.I lookede at it and detected sth. that
the variable nick must be written as "nick" ..So the last state of the code is like that
<param name="Nick" value="<%=Request.querystring("nick")%>">
.The java gets the value.
You are a great man ...

Yes my last question (really !
I have diasbled changing the nick in irc.it's time to hide the nick textbox which is shown in java applet .I searched but couldn't find a way to do it by the row <param name="Nick" value="<%=Request.querystring("nick")%>">

or disabling the text change in nick textbox
how can I add...


Edited by - minus on 21 September 2004 09:27:14
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 22 September 2004 :  03:49:23  Show Profile
Hi, minus.

I would be able to help you if it were a problem with ASP, but I am not an expert in javascript at all, I have just developed a couple scripts based in some code snippets I found in the Internet

However, I think that in this line you are just declaring a parameter that will be used when calling the applet. What the applet does with it (that is, show it or not, or make it editable or locked), must be coded within the applet itself, not in index.asp. That is, it must be changed somewhere in "jwirc_1_7_3.jar".

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page

minus
Starting Member

Turkey
8 Posts

Posted - 22 September 2004 :  19:13:36  Show Profile
Hi I solved the invisible nick (textbox) problem.I have found a command in
config.txt as autoconnect=0 And I changed the value 0 to 1 .So the applet
directly connects by getting the nick value and the form is not being
seen by the user.But this time I have another question.I have detected that
I have to send one more value to applets asp page (index.asp).
miperez wrote at top as new_page.asp?parameter1=20¶meter2=C.
He had given an example for sending 2 parameters but I couldn't
understand.I have tried several combinations but couldn't succeed.
How can I send 2 parameters at once ??
the original line to be modified is this::
Response.Write " <a href=""javascript:openWindow3('irc/index.asp?nick=" & strDBNTUserName & "')""" & dWStatus("Edit your personal profile...") & " tabindex=""-1"">Profile</a>" & vbNewline & vbNewLine

Edited by - minus on 22 September 2004 19:15:42
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 23 September 2004 :  03:33:01  Show Profile
Hi, minus.

Of course you can, I don't know why the line got "corrupt" on my first post.

[EDIT]I know now, if you try to post a string that contains the caracters

&-p-a-r-a

inside, it is changed to ¶. I guess it's the checkstring function.
[/EDIT]


The correct line is:

new_page.asp?parameter1=20&parm2=C


So, you could do something like:

Response.Write " <a href=""javascript:openWindow3('irc/index.asp?nick=" & strDBNTUserName & "&parm2=" & strParam2Value & "')""" & (... all the rest here)

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"

Edited by - miperez on 23 September 2004 03:39:55
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07