|
One big problem you will have is popup blockers. This is exactly the sort of window I close without even looking at it, and most other people will, too. If they want to run something that people will look at, it should be within your page, or a popup from a link in your page, so people click on it if they want to enter ( and don't hate you for having popups ).
A link with _target="blank" will open a popup window.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: A link with _target="blank" will open a popup window.
You suggest inline popups (Ajax I assume) and then go back to pre-JS (well ok it was target="resource" but you get my point)
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Ok... sooo.. again, im seriously in the dark with most stuff.
So what would be the best way to build this thing... java, asp?
|
|
|
|
|
You have to use a server side language like PHP or ASP.net. I would however recommend you hire someone to do this if it is going to be a corporate thing and you do not have experience programming.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi,
Im making a webpage that involves dates. So what I have done is once you select the month from one drop down menu it updates the number of days in the second drop down menu. It works perfectly in firefox but in internet explorer it just displays a blank list. I hope someone can help.
<br />
<br />
<script language="javascript"><br />
<br />
function daysInMonth(month,year) {<br />
var dd = new Date(year, month, 0);<br />
return dd.getDate();<br />
}<br />
<br />
<br />
function fromd(month){<br />
var days = daysInMonth(month, 2007);<br />
var output = "<option value='00'>DD</option>";<br />
<br />
for(var i=1;i<=days;i++){<br />
<br />
output +=" <option value=" + i + ">" + i +"</option> ";<br />
}<br />
return output;<br />
}<br />
<br />
function change1(month)<br />
{ <br />
document.getElementById("fromd").innerHTML = "" + fromd(month);<br />
}<br />
function change2(month)<br />
{ <br />
document.getElementById("departd").innerHTML = "" + fromd(month);<br />
}<br />
<br />
</script><br />
<br />
<br />
<td><div class="select2"><span>From:</span></div> <br />
<br />
<select name="fromd" id="fromd" class="trans" title=""><br />
<br />
<option value="0">DD</option><br />
<option value="1">01</option><br />
<option value="2">02</option><br />
...etc<br />
<option value="30">30</option><br />
<option value="31">31</option><br />
<br />
</select><br />
<br />
/<br />
<select class="trans" name="fromm" title="" onchange="change1(this.value)"> <br />
<option value="00">Month</option><br />
<option value="1">Jan</option><br />
<option value="2">Feb</option><br />
<option value="3">Mar</option><br />
<option value="4">Apr</option><br />
<option value="5">May</option><br />
<option value="6">Jun</option><br />
<option value="7">Jul</option><br />
<option value="8">Aug</option><br />
<option value="9">Sep</option><br />
<option value="10">Oct</option><br />
<option value="11">Nov</option><br />
<option value="12">Dec</option><br />
</select></td><br />
</tr><br />
<tr><br />
<td height="39"><div class="select2"><span>Depart:</span></div> <br />
<select class="trans" id="departd" name="departd" title=""><br />
<option value="00">DD</option><br />
<option value="1">01</option><br />
...etc<br />
<option value="31">31</option><br />
</select><br />
/<br />
<select class="trans" name="departm" title="" onchange="change2(this.value)"><br />
<option value="00">Month</option><br />
<option value="1">Jan</option><br />
...etc<br />
<option value="12">Dec</option><br />
</select></td><br />
</tr><br />
Thanks alot
Nicky
|
|
|
|
|
|
Hi
I’ve just converted a project from vs2003 to vs2005 and it builds successfully but when I run it, it throws the exception:
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Any idea how to solve this problem
Thanks
|
|
|
|
|
Debug your code and step through into your data layer to see what's actually failing, check the connection string it's finding, etc.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
If you "use" the CMMI concept what amout of time does it add to programming
I have heard that it doubles the code writing.
Rod
|
|
|
|
|
This is the first I've used a Web service and I'm having some trouble in getting the return data from the service I'm calling.
The Service is defined as follows:
Public Function CheckSeats(ByVal scheduleID As String) As Data.DataTable
And I consume it as follows:
Enrolment.EnrolmentService MyEnrol = new Enrolment.EnrolmentService();
seatTable = DMyEnrol.CheckSeats(Session["CourseID"].ToString());
Where seataTable is declared as a System.Data.DataTable.
I get the following error however when I try and build the solution:
Error 2 Cannot convert type 'Enrolment.CheckSeatsResponseCheckSeatsResult' to 'System.Data.DataTable' C:\Inetpub\wwwroot\_site_v02_04\_site_v02_04\content\SearchResults.aspx.cs 136 25 C:\...\_site_v02_04\
Can anyone tell me how to solve this problem?
|
|
|
|
|
You have to dig into the automated code of the proxy that (I suppose) Visual Studio has generated for you.
It is generated from WSDL, which in turn is generated automatically by Visual Studio again when the asmx was compiled.
You should check the WSDL definition of the method, and you should find that the method does return "Enrolment.CheckSeatsResponseCheckSeatsResult" (you can see it as a tag).
Now: proxy is generated to interpret SOAP and XML as they come from your WS, using Attributes (in C#). If you take a look at the attributes you should see that the method is expeted to return such class (that is: intercept that tag). You should also see the definition for CheckSeatsResponseCheckSeatsResult (either as class or tag) and seeing all this you have the opportunity to dim in which point originary DataTable definition was loose.
A trick I can suggest you is to generate proxy dll with C#: it give you more control over the deserialization of XmlResponse from WS.
I am assuming you are conusming your own webservice.
Another trick which may work is to use the IDataTable interface instead of DataTable class. This does not affect automatic serialization but may restrict opportunities of "fancy" code by autogeneration.
Hope this should help
Parsiphal
|
|
|
|
|
I am trying to make copy a text feature by using Javascriot and I wrote a function for it::
function copyData(field)
{
field.focus();
field.select()
Copied = field.createTextRange();
Copied.execCommand("Copy");
}
But it works in IE only, I want to get it worked in Mozilla, Firefox and Netscape too. What changes should I make for that??
I've used setSelectionRange(start,end) instead of createTextRange(), it only selects the text from the range from 'start' to 'end' but doesn't copy it.
Kindly Suggest!!
ANUJ
|
|
|
|
|
|
I had that problem myself. I have a time field and when i was clicking on Hour/minutes/second, i wanted the 2 representative digit to be selected depending on the position of the click.
My code obviouly didn't work on Firefox as usual
I found on the web the following code to solve the problem:
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
sel.moveStart(’character’, -myValue.length);
sel.select();
}
else if (myField.selectionStart || myField.selectionStart == ‘0′)
{
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value =
myField.value.substring(0, startPos)
+ myValue
+ myField.value.substring(endPos, myField.value.length);
myField.selectionStart = startPos;
myField.selectionEnd = startPos + myValue.length;
}
|
|
|
|
|
hi,
i have a dropdownlist.in this ddl i want to place the grid how is it possible?here i want to perform all the operations that can be performed on normal grid i.e., outside the the ddl.
now i want to perform the operations on the grid which is inside the ddl
|
|
|
|
|
you can't have a grid inside a drop down list, its rendered as a element which can only have or children
|
|
|
|
|
Hi all,
I want to add the selected element from one listbox to another listbox and remove also on button click event >(button text for add) and <(button text for remove).
Also I need to add all the element from one listbox to another and remove also on button click event >>(button text for add all) and <<(button text for remove all).
I want to do this with Javascript.
Please help me as I have to do this by today.
Thanks in advance.
|
|
|
|
|
Hi try this out it may help u
var conAdd = 'Add';
var conRemove = 'Remove';
var delimiter = "|";
function MoveOption(f, From, To, action)
{
var eFrom = eval('f.msb' + From);
var eTo = eval('f.msb' + To);
var selection = eFrom.options.selectedIndex;
var eAddContainer;
var eRemoveContainer;
if (action == conAdd)
{
eAddContainer = eval('f.htx' + conAdd + To);
eRemoveContainer = eval('f.htx' + conRemove + To);
}
if (action == conRemove)
{
eAddContainer = eval('f.htx' + conRemove + From);
eRemoveContainer = eval('f.htx' + conAdd + From);
}
if (selection == -1)
{
alert("Please select one or more users to move.");
}
else
{
eval('f.cmd' + action + '.disabled = true;');
for (i = 0; i < eFrom.options.length; i++)
{
if(eFrom.options[i].selected)
{
var name = eFrom.options[i].text;
var ID = eFrom.options[i].value;
eFrom.options[i] = null;
eTo.options[eTo.options.length] = new Option (name,ID);
i = i - 1;
var rep = new String('\\' + delimiter + ID + '\\' + delimiter + '');
var repExp = new RegExp(rep);
}
}
}
}
function onChange_msbUserPool(f)
{
f.cmdAdd.disabled = (f.msbUserPool.selectedIndex == -1);
}
function onChange_msbAssignedUser(f)
{
f.cmdRemove.disabled = (f.msbAssignedUser.selectedIndex == -1);
}
function moveup(list)
{
var daflag = false
for (var i = 0; i <= list.options.length-1; i++) {
if (!list[i].selected) {
daflag = true
}
if (list[i].selected && daflag) {
list.insertBefore(list[i],list[i-1])
}
}
}
function test()
{
newtest();
}
function movedown(list)
{
var daflag = false
for (var i = list.options.length-1; i >= 0; i--) {
if (!list[i].selected) {
daflag = true
}
if (list[i].selected && daflag) {
list.insertBefore(list[i],list[i+2])
}
}
}
All Element | Selected Elements |
1
2
3
4
5
|
|
|
|
|
|
UP
Down
|
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Thanks for the reply sir. I got some code but its not working I am not able to track whats wrong.
<html>
<head>
<script language="JavaScript">
function f_optionMove(s_from, s_to)
{
alert(s_from);
var e_from = document.forms['test_form'].elements[s_from],e_to = document.forms['test_form'].elements[s_to];
alert(e_from);
if (!e_from)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
if (!e_to)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
var n_moved = 0;
for (var i = 0; i < e_from.options.length; i++)
{
if (e_from.options.selected)
{
e_to.options[e_to.options.length] = new Option(e_from.options.text, e_from.options.value);
n_moved++;
}
else if (n_moved)
e_from.options[i - n_moved] = new Option(e_from.options.text, e_from.options.value);
}
if (n_moved)
e_from.options.length = e_from.options.length - n_moved;
else
alert("You haven't selected any options");
}
function f_optionMoveAll(s_from, s_to)
{
var e_from = document.forms['test_form'].elements[s_from],e_to = document.forms['test_form'].elements[s_to];
if (!e_from)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
if (!e_to)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
e_to.options.length = 0;
for (var i = 0; i < e_from.options.length; i++)
e_to.options = new Option(e_from.options.text, e_from.options.value);
e_from.options.length = 0;
}
function f_selectAll (s_select)
{
var e_select = document.forms['test_form'].elements[s_select];
for (var i = 0; i < e_select.options.length; i++)
e_select.options.selected = true;
}
</script>
</head>
<body>
<form id="test_form" name="test_form" runat="server">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
<select multiple name="source" style="width: 170px; height: 170px">
<option>Vishal</option>
<option>Pooja</option>
<option>Dnyandeo</option>
<option>Varsha</option>
<option>Aditi</option>
<option>Nilesh</option>
</select>
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
<input type="Button" style="width: 200px;" value="Add Selected >>" onclick="f_optionMove('source', 'destination')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Remove Selected <<" onclick="f_optionMove('destination', 'source')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Add All >>" onclick="f_optionMoveAll('source', 'destination')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Remove All <<" onclick="f_optionMoveAll('destination', 'source')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Select All Sources" onclick="f_selectAll('source')"></td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Select All Destinations;" onclick="f_selectAll('destination')"></td>
</tr>
</table>
</td>
<td>
<select multiple name="destination" style="width: 170px; height: 170px">
</select>
</td>
</tr>
</table>
</form>
</body>
</html>
Please tell me where I am going wrong.
|
|
|
|
|
hi all,
has anybody an idea how can i customize the design of my media player?
and is there also an reference how can i controll the mediaplayer from javascript ?
greetings gigo
|
|
|
|
|
media player is not the most flexible utility to use when displaying interactive content. You would be better off using a flash client.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
|
Hello all,
I have designed a dropdown menu with simple javascript code but actually when disabling the "javascript" property from IE, the menu doesn't work. instead i found this site: "http://www.redballoondays.com.au/" which has same dropdown and it works even if i disabled the javascript property from IE.
So can anyone help me in running me menu even if the javascript is disabled in IE.
Thank you
|
|
|
|
|
That website is using CSS rather than javascript for the menu (a much better way). Theres plenty of examples out there on how to do this (I think the dynamic drive site has a few)
|
|
|
|
|
what about this?? this is the script used by the website
but if you have examples for using css in dropdown menus, please mention one
Thank you
<![CDATA[//><!]]>
|
|
|
|