|
Sure! But do you think the browsers of the world are going to fall for it?
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
Hi,
I'm calling for some script which displays info according to category.
This is how i do it :
<!--#include virtual="/cgi-bin/info_by_category.pl"-->
It works , but currently it always displays the same default category.
Now , the problem : I dont know what category i gonna use. It comes through URL , because the URL looks like this :
www.mydomain.com/info.html?category=1
where the number "1" can be any number from 0-9.
The perl script cant retrieve this info through
$ENV{'QUERY_STRING'}
because i call the script without any parameters.
I'd like somehow to add category number when calling
the script IN RUNTIME (!)
<!--#include virtual="/cgi-bin/info_by_category.pl?category=x"-->
where the "x" is category number passed in URL ,
but dont know if its possible.
Help needed!
Thanks in advance
I tried adding it with JavaScript but id didnt work out ;(
|
|
|
|
|
Why use SSI at all if you have perl at your disposal?
You're really using the wrong tool for the job here. SSI is really intended for adding simple dynamic information (e.g. dates, hit counters, document modification dates, etc.). It's support for variables, conditionals, and dynamic string manipulation (which you apparently need) are very limited if they exist at all.
It seems to me that the only way to do what you want is to dynamically load your page that contains the SSI. At that point, it seems just silly to be using SSI at all. PHP or Perl itself would be much more capable to do what you want.
Here's a couple of questions that may help if you're insistent on using SSI:
1. Where are you obtaining the category id from. Is it just hard coded in a hyper link? If so, then why not just make your hyperlink point the cgi itself passing the appropriate id directly?
2. Can you use perl or php along with SSI? If so, to do what you want would be as simple as:
<?php
$categoryID = $HTTP_GET_VARS["category"];
echo "<!-- #include virtual=\"/cgi-bin/info_by_category.pl?category=$categoryID\"-->\n";
?>
3. Can you get rid of SSI altogether? If so, just move your perl script code into a CGI that draws everything you need and then runs the info_by_category.pl code. The url would then just be:
<a href="/cgi-bin/info_by_category.cgi?category=1">Info</a>
Let me know if you need any clarification.
Best Regards.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Matt, thanks for your reply.You're right - capabilities of SSI are very limited , but i still successed to do what i wanted
Here's how i do it :
|
|
|
|
|
I would like to write an article on this!!! But for now I'll just post the code I Built!!!
I have noticed those flashy sliding menu's??? (some problem with timing)
The html to describe the menu's initial positions
<code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>
</title>
<style type="text/css">
a.menulink {
color: white;
font: bold 16pt sans-serif;
}
a.tab {
color: white;
font: bold 16pt sans-serif;
background-color:yellow;
text-justify: center;
border-style: solid ;
border-color: black ;
border-left-width:1px;
border-right-width:1px;
border-top-width:1px;
border-bottom-width:1px;
}
</style>
</head>
<body >
<div id="menu1" style="position:absolute; left:151px; top:-135px; width:98px; height:180px; color: white ; background: red; visibility: hidden; " onmouseover="onLower('menu1');" onmouseout=" checkOutMenuArea('menu1')">
<p style="text-align: center; " >
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 1</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 2</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 3</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 4</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 5</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'"> link 6</a><br/>
menu 1
</p>
</div>
<div id="menu2" style="position:absolute; left:251px; top:-135px; width:98px; height:180px; color: white ; background: red; visibility: hidden; " onmouseover="onLower('menu2');" onmouseout=" checkOutMenuArea('menu2')">
<p style="text-align: center; " >
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 1</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 2</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 3</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 4</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 5</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 6</a><br/>
menu 2
</p>
</div>
<div id="menu3" style="position:absolute; left:351px; top:-135px; width:98px; height:180px; color: white ; background: red; visibility: hidden; " onmouseover="onLower('menu3');" onmouseout=" checkOutMenuArea('menu3')">
<p style="text-align: center; " >
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 1</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 2</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 3</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 4</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 5</a><br/>
<a class ="menulink" href="javascript:;" onclick="alert('not implemented');" onmouseover="this.style.color='black'" onmouseout="this.style.color='white'" > link 6</a><br/>
menu 3
</p>
</div>
<script type="text/javascript" src="menu85.js"> </script>
<script type="text/javascript" > initialiseMenuDetails("menu1:menu2:menu3",3); </script>
<a class="tab" style="position:absolute; left:151px; top:20px; width:96px; height:18px;" href="" onmouseover="onLower('menu1')" onmouseout="checkOutBottomLink('menu1')" >menu1</a><br/>
<a class="tab" style="position:absolute; left:251px; top:20px; width:96px; height:18px;" href="link" onmouseover="onLower('menu2')" onmouseout="checkOutBottomLink('menu2')" >menu2</a><br/>
<a class="tab" style="position:absolute; left:351px; top:20px; width:96px; height:18px;" href="link" onmouseover="onLower('menu3')" onmouseout="checkOutBottomLink('menu3')" >menu3</a><br/>
</body>
</html></code>
The javascript (saved as menu85.js in above html)
<code>// SLIDING MENU FOR EXPLORER ©2004 Jason Morley.. Please Distribute and use it, but do not alter!!! email me at JASON.MORLEY@STUDENT.SHU.AC.UK with suggestions yes I haven't fully cleaned this code up.
var missed=false;
var killInterval=false;
var interval=false;
var moveInterval;
var clip=200;
var initialMenuDetails,numMenu;
var menuState;
var timeToDrop=.25; // The time for the menu to slide goes here (assuming the pc can handle it)
var stepsToDrop=10;
function initialiseMenuDetails(strMenuIDNames,menuTabs) {
numMenu=menuTabs;
dropInterval=new Array(numMenu);
raiseInterval=new Array(numMenu);
fIPD=new Array(numMenu);
fIPR=new Array(numMenu);
initialMenuDetails=new Array(numMenu); //this array stores the initial information for each menu.
menuState= new Array(numMenu); // this array stores the menu's current state 0 closed 1 open 2 drop 3 raising
var tArray=strMenuIDNames.split(":");
for (var x=0;x<numMenu;x++){
menuState[x]=0; // menu currently closed
initialMenuDetails[x]=new Array(10);
initialMenuDetails[x][0]=tArray[x]; // Id
menuElement= document.all[tArray[x]];
initialMenuDetails[x][1]=menuElement.style.posTop;
initialMenuDetails[x][2]=menuElement.style.posBottom;
initialMenuDetails[x][3]=menuElement.style.posLeft;
initialMenuDetails[x][4]=menuElement.style.posRight;
initialMenuDetails[x][5]=menuElement.style.posWidth;
initialMenuDetails[x][6]=menuElement.style.posHeight;
}
}
function getArrayRef (menuId) {
for (var x=0;x<numMenu;x++){
if (initialMenuDetails[x][0]==menuId)
return x;
}
}
function getState(menuId) {
for (var x=0;x<numMenu;x++){
if (initialMenuDetails[x][0]==menuId)
return menuState[x];
}
}
function getStateArr(arrNo){
return menuState[arrNo];
}
function setState(menuId,state) {
for (var x=0;x<numMenu;x++){
if (initialMenuDetails[x][0]==menuId)
{
menuState[x]=state;
return;
}
}
}
function onLower(menuId){
arrRef=getArrayRef (menuId);
if (getState(menuId)!=1)
if (getState(menuId)!=2)
{
for (var x=0;x<numMenu;x++){
if (menuState[x]!=0)
{
menuState[x]=3;
}
}
setState(menuId,2);
if (interval==false){
interval=true;
moveInterval=setInterval("moveMenu()",timeToDrop/stepsToDrop*1000);
}
}
else {missed=true;}
}
function onRaise(menuId){
arrRef=getArrayRef (menuId); if (getState(menuId)!=3||getState(menuId)!=0){
setState(menuId,3);
if (interval==false) {
interval=true;
moveInterval=setInterval("moveMenu()",timeToDrop/stepsToDrop*1000);
}
else {
missed=true;
}
}
}
function moveMenu() {
interval=true;
if (killInterval==true&&missed==false)
{
clearInterval(moveInterval);
killInterval=false;
interval=false;
return;
}
for (var x=0;x<numMenu;x++){
if (menuState[x]==2)
{
lower(initialMenuDetails[x][0]);
}
if (menuState[x]==3)
{
raise(initialMenuDetails[x][0]);
}
}
var kill=true;
for (var x=0;x<numMenu;x++){
if (menuState[x]==2||menuState[x]==3) { kill=false;}
}
if (kill==true&&missed==false) { killInterval=true;}
if (missed==true) { killInterval=false; }
missed=false;
}
function lower(menuId){
var menuElement = document.all[menuId];
var ary=getArrayRef(menuId);
var lowerBy= (initialMenuDetails [ary][6])/stepsToDrop;
var clip=initialMenuDetails [ary][6]-((menuElement.style.posTop+lowerBy)-initialMenuDetails [ary][1]);
if (0<=clip) {
menuElement.style.posTop+=lowerBy;
menuElement.style.clip='rect('+clip+' auto auto auto)';
menuElement.style.visibility="visible";
}
else {
setState(menuId,1);
}
}
function raise(menuId) {
arrRef=getArrayRef (menuId);
var menuElement = document.all[menuId];
var ary=getArrayRef(menuId);
var raiseBy= (initialMenuDetails [ary][6])/stepsToDrop;
var clip=initialMenuDetails [ary][6]-((menuElement.style.posTop-raiseBy)-initialMenuDetails [ary][1]);
if (clip<=initialMenuDetails [ary][6]) {
menuElement.style.clip='rect('+clip+' auto auto auto)'
menuElement.style.posTop-=raiseBy;
menuElement.style.visibility="visible";
}
else {
setState(menuId,0);
menuElement.style.visibility="hidden";
}
}
function checkOutMenuArea(menuId){
var ary=getArrayRef(menuId);
var menuElement = document.all[menuId];
mousePosX=window.event.x;
mousePosY=window.event.y;
if (mousePosX>(menuElement.style.posLeft+2)&&mousePosX<(menuElement.style.posLeft+initialMenuDetails[ary][5]-2)&&mousePosY>(menuElement.style.posTop)&&mousePosY<(menuElement.style.posTop+initialMenuDetails [ary][6]))
{ onLower(menuId); return;}
onRaise(menuId);
}
function checkOutBottomLink(menuId){
var ary=getArrayRef(menuId);
mousePosX=window.event.x;
mousePosY=window.event.y;
var menuElement = document.all[menuId];
if (mousePosY>(initialMenuDetails [ary][6]+initialMenuDetails [ary][1]))
{ return;}
onRaise(menuId); return;
}</code>
|
|
|
|
|
I am developing a real estate website. Now on the site are 4 combo boxes. It starts off with a province combo box. When a user selects a province, all the regions for that province are loaded into another combo box, and then if a region is selected, all areas for this region is loaded into another combobox. I do this by making a trip to the server everytime a selection is made. The form is submitted to itself (registration.asp). This works perfectly.
My problem starts as soon as when I want to validat the fields and submit the data to another page. I can't because I am already submitting the form to itself (registration.asp). How do I trigger the javascript function when the submit button is clicked and when all fields are filled in submit it to another page, eg test.asp. Here I will retrieve and use the values. I would like to send my code so that you can look at it, not very complicated code.
Please return ASAP!
Thanks
|
|
|
|
|
Handle the OnSubmit event of the form
in the handler set form's action to "test.asp"
|
|
|
|
|
How do I change this in the onsubmit() method? Isn't this the same as when the form is submitted to itself?
|
|
|
|
|
agree with hspc.
You can change the form's action property such as "test.asp" by javascript in form's submit event.
Thinking-Asking-Thinking
|
|
|
|
|
I have created a control which main class (with attributes) is:
[DefaultProperty("Text"),ToolboxData("<{0}:MioCmd runat=server>"),
ParseChildren(ChildrenAsProperties = false),
ControlBuilderAttribute(typeof(MioCmd.MioBuilder)),
Designer("MioCmd.MioDesigner, MioCmd"),
PersistChildren(false)]
public class MioCmd : WebControl, INamingContainer{
...
}
into MioCmd I have an attribute with this declaration:
[Bindable(false),
Description("Imposta i comandi dell'editor."),
NotifyParentProperty(false),
RefreshProperties(RefreshProperties.All),
PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public ComandiCollection Comandi{
set{this.objComandi = value;}
get{return this.objComandi;}
}
the type of this attribute is derived from ControlCollection and the class has this declaration:
public class ComandiCollection : ControlCollection, IEnumerable{
...
}
ComandiCollection is a Collection of child controls of type Comando which inherits from Control:
[DefaultProperty("CommandId"), Bindable(false)]
public class Comando : Control{
...
}
My problem is that everytime I try to change the property Comandi through Visual Studio collection editor I'm not able to Add/Remove elements (the two buttons are disabled!!!) and every change that I made Isn't visible in the main window by now, but It is visible only after switching from visual editor to code editor and back to visual editor...
I really don't know how to solve this problem...do I have to change architecture or do I have to made some little changes?...if you have an Idea please help me!!!
ciao
Alessandro Angelotti
MKTG Street Srl
aleang72@hotmail.com
|
|
|
|
|
How to change small icon of ieplore in address bar of internet explorer
its me
|
|
|
|
|
You must add this tag in HEAD
----
hxxbin
|
|
|
|
|
Hi,
I want to use a Data Grid in ASP through which I can add/edit/delete/update the records in the Access 2000 table. Can anyone help?
|
|
|
|
|
|
Classic ASP only not .NET
|
|
|
|
|
|
Hi
I need a help in my project. I am doing the leave management system using asp and acess.
I am using a table which keeps track of casual and other leaves for an employee.The problem is no of casual leaves for an employee in an yr is 7.
A financial year starts from april 1st to march 31 st.
so each yr on april 1st i have to reset the casual leave values in the acess table back to 7.how do i do that(remember back end is acess) .
Some 1 told me u should write a script that will execute on April 1st AND put it in the server where i am putting the project.But how to do that i searched ggogle but could not find any eg like that
CAn some 1 help me out plz its urgent
Pradeep
|
|
|
|
|
Hi
I need a help in my project. I am doing the leave management system using asp and acess.
I am using a table which keeps track of casual and other leaves for an employee.The problem is no of casual leaves for an employee in an yr is 7.
A financial year starts from april 1st to march 31 st.
so each yr on april 1st i have to reset the casual leave values in the acess table back to 7.how do i do that(remember back end is acess) .
Some 1 told me u should write a script that will execute on April 1st AND put it in the server where i am putting the project.But how to do that i searched ggogle but could not find any eg like that
CAn some 1 help me out plz its urgent
|
|
|
|
|
Hi
I've searched in several places but not in luck. I must add a new feature on a 'legacy' ASP3 application (don't have time to migrate it), and I want do it using a web service, because this new feature will be used on a win32 app. too.
Anyone my help me?
Thanks!
Pep
Pep Lainez
|
|
|
|
|
I can search the MSDN library of a friend and I've found an article that could help:
.NET Interop: Get Ready for Microsoft .NET by Using Wrappers to Interact with COM-based Applications
The link to the MSDN Library is:
ms-help://MS.MSDNQTR.2003FEB.3082/dnmag01/html/INTEROP.htm
Hope to help someone too.
Pep Lainez
|
|
|
|
|
I am writing a web service application for a windows server and am wondering if there is anything I MUST provide for? Can I just write my application and load it up in the service manager and run it?
Also, it is going to recieve commands from a servlet running on a linux box over a LAN. Can a service just open a socket and listen for input?
Thanks for your time
Managing Director of B9 Software
www.b9software.com
|
|
|
|
|
Web services are usually exposed by the web server, or by an app server (in the case of Java web services) that expose the service on an HTTP or HTTPS port. No need to open a socket since web requests are passed to the web service via the web/app server. On Windows 2000, XP, 2003 servers, this means IIS and ASP.NET handle the web service requests, unless you're using an alternative web server/app server to handle web services.
See:
|
|
|
|
|
hey guys
whats the best strategy for search engine listings for a website? im not much up on such things as it smacks too much of marketing (which i hate) but i said id get some ideas for some people i know
thnx
"there is no spoon" biz stuff about me
|
|
|
|
|
|
errrrr thnx but i meant how do we get listed on search engines
i know how they work already thanks
"there is no spoon" biz stuff about me
|
|
|
|