Proper Ways For Empty Link
Nov 23, 2005if i want to have a empty link, which way is more proper?
<a href="">
<a href="#">
<a href="javascript:void(0);">
if i want to have a empty link, which way is more proper?
<a href="">
<a href="#">
<a href="javascript:void(0);">
I am writing an MVC ASP.NET based website, and I want to create a ActionLink that deletes the current entity. For search engine reasons, I don't want this link to be able to be followed (else all my data is gone!), unless a user, via jQuery, confirms the action. For the confirmation, I can use something like:
[html]
<a href="" id="delete">Delete this entity</a>
[js]
$( function() {
[Code]....
What is the best way to do this? Should I submita form or is there a navigate method that I missed?
How to get this to work?
01.js:
I want to get some idea of what methods there are to center a div element.If you know a cool method please show us how it's done using this jsfiddle dummy to start
View 16 Replies View Relatedis there any real difference between these two function declarations?
function DoSomething(parm) {
//do something here
}[code]...........
Are there other ways to open multile windows at once?
<SCRIPT language="JavaScript">
function open1() {
var open1 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
function open2() {
var open2 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
function open3() {
var open3 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
// -->
</SCRIPT>
<A href="javascript:open1();open2();open3();">Click Here to open all</A>
Here is what I have now, but I need something which can pass HTTP_REFEREER.
The window.open does not do that.
Well, I've been working with JS for three years and have a great experience here. But! I still have no really acceptable answer to the following
question:
What is the principle difference between declaring methods/properties
in the constructor function body and via prototypes.
Are there any real GURUs? Let's discuss the issue.
I used a menu making program to create a cool new menu for my website, but I can't get it to work properly.The menu code uses this argument: "java script:[code]in my above code there isn't really a space between 'java' and 'script'.
View 1 Replies View RelatedExploring Ways to Embed Tables & Spreadsheets in Web Pages
View 2 Replies View RelatedI have a set of input fields that can be dynamically duplicated/cloned or removed and submitted. I'm looking for a ways to configure the form for easy processing without having to loop through each input field inside the divs:
<form action="dummy.php" method="post">
<div id="customer1">
Name: <input type="text" name="name1">
[code]....
I'm sure this is probably the wrong place to ask, but is there a way to execute an SSI script in javascript?
I'm using an SSI script to read a memory address, and I'd like to be able to update the value every few seconds without having to refresh the entire page. Does anyone know a possible way to do this, or am I stuck with refreshing the entire page every 4 seconds?
I am using jQuery.get to make an AJAX request to the server which should return a JSON object, but it is interpretated by jQuery as a string, not an object.[code]I do not use getJSON because I want to make one request which could return in a JSON object, or just a string, depending on some conditions.
View 2 Replies View RelatedVery new using jQuery. Anyway, I have the following few lines which create a component on a web page.[code]...
Upon some analysis, I can see that the css does contain the styles used by my div. So now, I would like to change the colors of the component, but I am not sure what is the best practice. Can one override in the div tag the colors, or should one duplicate the .css and change it?
Seeking the best way to perform this that other in the group use.
This is my first jQuery code so I am noob at that case. I have created page with 4 tabs based on that tutorial:Each tab has form to fill out and submit. Starting on first tab, then if passed validation goes to next, etc. But when will not pass a validation I want to keep open that tab where the error occurred. My PHP code for the second tab looks like:
if(count($errors) > 0)
{
echo '<script type="text/javascript">
[code]....
I have some code that attempts to save a user's preference settings. It first tries to use "localStorage", and if that fails (only old versions of MSIE), then a cookie is used instead.For example, if I intentionally misspell "localStorage" by instead using "localStor" (simulating a browser that doesn't understand the object name), the code simply does not run.unfortunately, that doesn't work.
View 2 Replies View RelatedSo firstly this is likely not in the right place at all, as it's a bit OT but I figured it's the best place to ask. I have to document 4 different tests to my code; what structure should I take when doing this?
I was thinking:
* State the aim of the test
* State the inputs, and what I believe the output should be.
* State the actual output, and whether this positively or negatively affect my code.
So I have the following form field:
Code HTML4Strict:
<input type="text" size="9" style="width: auto">
I do this, because in CSS I set all my input fields to 'width:200px;' (looks better), but also require some fields to be shorter (which I do by setting 'width:auto' and attribute size="x"). The problem with this is that I need to get the precise width of all inputs with jQuery!
But if I do the following:
Code JavaScript:
alert( $( "input" ).css( 'width' ) );
It outputs: 'auto'
How do I make it return the element's actual width?
I m trying to put a button's value (e.g. a button putting a special character in a form ) in the "selected" form input that the curson is in it and typing characters.. The concept is the following . A form is created and has some input text fields and the user can write the appropiate data in these input fields. Also some buttons are created each one representing a special character and the user can click them in order to put the special character that the button has in the text field he is writing. I'm wondering how after a buttons is click it's value to appear only in the text field that someone's writing.
View 3 Replies View RelatedHow does one assign the return value of a jQuery method/plug-in to a reference variable?
An IT idiot with apparent zero ability to communicate among Geeks who systematically eschew reading but readily recommend the writing of others.
I have to create a table using javascript. Firefox displays the expected result but for IE, the column width is screwed >"< I have to use the col tag to set width because sometimes the first row maybe merged. All I need is to create a table that strictly displays according to the inputted column widths from my program. In below I have setup very short example that construct table in a similar way to my original javascript function. I also draw a ruler to help showing the proper width of 400px on the screen. column 1 should be 100px width and column 2 should be 300px.
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<body onload="init()">
Hard Coded:
<DIV style="WIDTH: 400px; HEIGHT: 25px;overflow:hidden;">
[Code]....
I'm trying to create a list, to which you can:
1. Add and remove items.
2. According to what's in this list, there should be dynamic content loaded on to the page.
I've accomplished 1 with the code below. I'm not sure about how to accomplish 2.
<script language="javascript">
var listItems = new Array();
var currentList = new String();
function listManager(task, id, name) {
//$("#debug").append(" ##### List manager. ("+listItems.length+"
items) #####
");
if(task == "add") {
refreshList(); // refresh the list .....
Now that we're switching to feature detection rather than browser detection, how does/should one detect for a webkit browser?Is there a known feature that we can check for that would Identify Safari and Chrome?We're running into some (rather minor) layout issues with some jquery plug-in rendered content in Chrome and Safari and it'd be really easy to just do a 'if a webkit browser, tweak this' type of logic.
View 4 Replies View RelatedThe webpage doesn't display the proper times when I load it up.The GMT variable deals with the Greenwich timezone, which that time is used with offset variables in order to get the right times from each respective time zone in the branch offices.So far it seems only houston and new york display the right times or close to it all the other ones are way off.
View 1 Replies View RelatedI'm using Walter Zorn's Drag & Drop script on my page: [URL]. The script works just fine. But there is a problem when the visitors are trying to print out their design. All "draggble" elements are getting shifted in relation to the rest of the page (try to move "draggble" elements, and then go to Print Preview to see what happens). The page layout is centered on the screen:
#maincontainer{margin: 0 auto; /*Center container on page*/}
Drag & Drop script recalculates positions of elements from the Top Left corner. If I change margin to left, than everything prints out just fine, without shifting. I'd like to keep my page layout centered on the screen and I know nothing about Java programming. How to make necessary changes to the Drag & Drop script to achieve proper page printing?
Drag & Drop script path: [URL]
CCS path: [URL]
I'm trying to force jQuery UI Tabs to work with browser locations (as in direct-linking or bookmarking), but having very little luck doing so. It feels like I've seen this question at least 50 times around the net, and the answer mostly consists of one of the following 5:
[Code]...
Hierarchically based tabs (hopefully something better than "level1-level2-level3") As I said, I know it has been asked before, but apparently I am now the only one struggling with this. So if anyone could give some suggestion on how to use jQuery Address, jQuery BBQ or any other method to accomplish this,
What is happening is when I try to submit the form, I receive an error that says I need to input all data in the proper format.
<html><head>
<title>Conference Registration Form</title>
<link href="conf.css" rel="stylesheet" type="text/css" />
<script type = "text/javascript">
Calculate total registration fee
Retrieve the value of the selected index property from guests selection lists
Multiply the selected index by 30 and add this to the cost variable
If the first member radio button is checked subtract 25 from the value of the cost variable
Set the value of the total field equal to the value of the cost variable
function calcCost() {
cost = 145 + (guests_quantity * 30);
guests = document.reg.guests;
gindex = guests.selectedIndex;
guests_quantity = guests.options[gindex].value;
if (document.reg.member[0].checked == true) {
cost = cost - 25;
} document.reg.total.value = cost; .....