drugoholic 0 Light Poster

I'm just wondering since Godaddy owns a lot of hosting companies, is siteground one of them?

And do they support or oppose SOPA?

drugoholic 0 Light Poster

Hello,

I have 2 tables: news and users

news
- N_id (primary)
- title
- article
- time
- U_id

users
- U_id (primary)
- member

I have managed to create the gridview with edit/add/delete for news only, without incorporating the users who wrote that news article.

My question here is how can I add a column for the member in the main gridview so that whenever I add a new row, I can select a member (id) to go along with the article.

drugoholic 0 Light Poster

Edit: Solved

drugoholic 0 Light Poster

Hello,

I'm working on a small web app in C#, I have made the database and created a gridview to display and edit the data.

I just want to know how can I turn a textbox field (in the update view) to textarea so I can see the whole text before updating.

Thanks.

drugoholic 0 Light Poster

For starter, I don't see the MessageBox "Result too big...", when the result of the text boxes is greater than 1000, it simply jumps to the first IF outside the foreach and displays "Excellent, your score is 1500"

drugoholic 0 Light Poster

This is the code of view.html.php found in /components/com_k2/views/itemlist/
it's 300 lines.

<?php
/**
 * @version		$Id: view.html.php 553 2010-09-13 10:26:33Z lefteris.kavadas $
 * @package		K2
 * @author		JoomlaWorks http://www.joomlaworks.gr
 * @copyright	Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.view');

class K2ViewItemlist extends JView {

    function display($tpl = null) {

        $mainframe = &JFactory::getApplication();
        $params = &JComponentHelper::getParams('com_k2');
        $model = &$this->getModel('itemlist');
        $limitstart = JRequest::getInt('limitstart');
        $view = JRequest::getWord('view');
        $task = JRequest::getWord('task');

        //Add link
        if (K2HelperPermissions::canAddItem())
            $addLink = JRoute::_('index.php?option=com_k2&view=item&task=add&tmpl=component');
        $this->assignRef('addLink', $addLink);

        //Get data depending on task
        switch ($task) {

            case 'category':
                //Get category
                $id = JRequest::getInt('id');
                JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
                $category = &JTable::getInstance('K2Category', 'Table');
                $category->load($id);

                //Access check
                $user = &JFactory::getUser();
                if ($category->access > $user->get('aid', 0)) {
                    JError::raiseError(403, JText::_("ALERTNOTAUTH"));
                }
                if (!$category->published || $category->trash) {
                    JError::raiseError(404, JText::_("Category not found"));
                }

                //Merge params
                $cparams = new JParameter($category->params);
                if ($cparams->get('inheritFrom')) {
                    $masterCategory = &JTable::getInstance('K2Category', 'Table');
                    $masterCategory->load($cparams->get('inheritFrom'));
                    $cparams = new JParameter($masterCategory->params);
                }
                $params->merge($cparams);

                //Category link
                $category->link = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($category->id.':'.urlencode($category->alias))));

                //Category image
                if (! empty($category->image)) {
                    $category->image = JURI::root().'media/k2/categories/'.$category->image;
                } else {
                    if ($params->get('catImageDefault')) {
                        $category->image = JURI::root().'components/com_k2/images/placeholder/category.png';
                    }
                }

                //Category plugins
                $dispatcher = &JDispatcher::getInstance();
                JPluginHelper::importPlugin('content');
                $category->text = $category->description;
                $dispatcher->trigger('onPrepareContent', array ( & $category, &$params, $limitstart));
                $category->description = $category->text;

                //Category K2 plugins
                $category->event->K2CategoryDisplay = '';
                JPluginHelper::importPlugin('k2');
                $results = $dispatcher->trigger('onK2CategoryDisplay', array(&$category, &$params, $limitstart));
                $category->event->K2CategoryDisplay = trim(implode("\n", $results));
                $category->text = $category->description;
                $dispatcher->trigger('onK2PrepareContent', array ( & $category, &$params, $limitstart));
                $category->description = $category->text;

                $this->assignRef('category', $category);
                $this->assignRef('user', $user);

                //Category childs …
drugoholic 0 Light Poster

I've just started my .Net courses and this is the exercise they made us do at the lab, pretty simple stuff. It worked well at the lab but now that I'm home to retest it, the if condition inside foreach is not working properly. The system is bypassing it automatically for some reason and jumps to first IF outside foreach.

Where am I going wrong with this? Is it that the values are too big "> 1000" ?
Please help me understand what's going on.

private void button1_Click(object sender, EventArgs e)
        {

            // Adds objects in the ArrayList
            f.Clear();
            f.Add(textBox1.Text);
            f.Add(textBox2.Text);
            f.Add(textBox3.Text);
            f.Add(textBox4.Text);
            f.Add(textBox5.Text);

            
  
            int result = 0;

            // foreach loop into the ArrayList
            foreach (object item in f)
            {
                if (int.Parse(item.ToString()) > 1000)
                {
                    MessageBox.Show("Result Too Big. Terminating!");
                    break;
                }
                result += int.Parse(item.ToString());
            }

            if (result > 80)
            {
                MessageBox.Show("Excellent, your score is " + result.ToString());
                
            }
            else if (result > 60)
            { 
                MessageBox.Show("Good, your score is " + result.ToString());
            }

        }
drugoholic 0 Light Poster

Hello,

I'm trying to edit the style of a normal html table in Joomla/K2 that outputs the author, title of the article and date. The problem is (I thought joomla does this automatically) is that the header of the table keeps repeating on every new record.

Screenshot

I realized that I have to create the loop manually but how can I when there's not sql statement to fetch the data from the db.

This is the code, please help.

<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
<tr> 
<td>Num</td> 
<td>Title</td> 
<td>Date</td> 
</tr> 

<tr> 
    <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%"> 
        <?php echo JText::_('Num'); ?> 
    </td> 
     <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"> 
        <?php if($this->item->params->get('catItemTitle')): ?> 
      <?php if ($this->item->params->get('catItemTitleLinked')): ?> 
            <a href="<?php echo $this->item->link; ?>"> 
              <?php echo $this->item->title; ?> 
          </a> 
          <?php else: ?> 
          <?php echo $this->item->title; ?>  
          <?php endif; ?> 
    </td> 
    <?php endif; ?> 

    <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%"> 
        <?php if($this->item->params->get('catItemDateCreated')): ?> 
        <!-- Date created --> 
        <span class="catItemDateCreated"> 
            <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?><?php endif; ?> 
    </td> 
</tr> 
</table>
drugoholic 0 Light Poster

Hello,

First of all, I would like to say that I'm a newbie in visual studio. I come from a php/mysql background involved in web development.

My task here is to create an real estate application for my company. I have so many questions but first I would like to know how to have the navbar menu links to work with different windows.

I have created a navbar with 2 groups: properties and clients. I have already added a gridview and linked it to a table. I want the grid to appear on clients and another grid to appear on properties. How can I achieve that?

Thank you.

drugoholic 0 Light Poster

Hello,

I have this reservation form found on the main page of: http://www.avis.com.lb/
As you can see the current month "August" is selected as the default month and so is the year and day (the day is programmed to jump 2 days ahead for the renting of the car...)

However if you look closely (check the screenshot attached) you'll see that the month "August" is repeated twice and so is the year "2009", the current month is repeated twice. What I wanna do is remove the duplication and just auto select the current month without duplicating it.

I found this code: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_24229186.html
But it doesn't seem to work with my form, I donno why.

Here is the code of the script both javascript and a little bit of php

$date = strtotime("+2 day");
				$date2 = date('j',$date);
				 $date4 = strtotime("+5 day");
				$date3 = date('j',$date4);
				if($date3 == 1){
				$nextmonth = strtotime("+1 day");
				$monthid = date('m',$nextmonth);	
				}else{
				$nextmonth = strtotime("+0 day");
				$monthid = date('m',$nextmonth);	
				}
			if ($monthid==1){
				$year = date("Y") + 1;
			}else{
				$year = date("Y");
			}
          	//$pupday = date("j") - 12;
          	//$pupday = date("d") + 2;
          	//echo $pupday;
          	//$returnday = date("d") +5;
          	$month = date("F");
var xMonths = new Array( '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12' );

function getListValue( option_object  ){return option_object[ option_object.selectedIndex ].value;}
function setListValue( option_object, value  ){ option_object.selectedIndex = value;}
function addDays(myDate,days) {
    return new Date(myDate.getTime() + days*24*60*60*1000);
}
function init()
{ …
drugoholic 0 Light Poster

I think the problem is here:

if($class_type_id[$nb]<>5){ // NO class SP
		
			if($age_range_id[$nb-1])$get_amount=id2fields("policy","amount",
				"age_range_id=".$age_range_id[$nb-1]." and class_type_id=".$class_type_id[0]." and family_type_id=$family_type_id $add");
		
		}
		/*else { // Class SP
			
			if($age_range_id[$nb-1])$get_amount=id2fields("policy","amount",
					"age_range_id=".$age_range_id[$nb-1]." and class_type_id=".$class_type_id[0]." and family_type_id=$family_type_id $add");

		}*/
		else { // Class SP
						
						$get_amount=id2fields("policy","amount",
								"age_range_id=".$age_range_id[$nb]." and class_type_id=".$class_type_id[$nb]." and family_type_id=".$family_type_id[$nb]." $add");
			
					}

As you can see if $class_type_id is not equal to 5, it has a different function and I think the function is wrong. I tried to use 2 different ones with no luck so far.

drugoholic 0 Light Poster

Hey there,

I'm facing a problem with a calculator on my site, you can see it here: http://axa.seomena.com/fr/calculez-vos-primes/calculez-vos-primes-assurances-medicales

The problem is, when you choose the "number of family" whether you're a family of 1 or a family of 6 and more, (in the next step) if you choose anything but "Class SP" the calculation will work, but if you choose "Class SP" in the "Montant Police(US$)" cell instead of printing a value number it just says "NAN", I donno what's the problem with it but I'm assuming it's something to do with the php or some missing values in phpmyadmin.

If you notice in the image attached below that when "Class_type_id" is equal to "5" the "family_type_id" is always equal to 0. class_type_id 5 represent the "Class SP".

Here is the code

ksort($counter);
    foreach ($counter as $nb=>$data){
       
        //echo $age_range_id[$nb].'--'.$class_type_id[$nb].'--'.$nssf[$nb].'--'.$amb[$nb].'--'.$med[$nb].'--'.$doc[$nb].' ||||||| ';
        //echo $nb;
        //if((!$age_range_id[$nb-1])||(!$class_type_id[$nb]))continue;
        if($nssf[$nb]=="on")$add="and nssf=1";
        else $add="and nssf=0";
       
        if(($amb=="on") && ($age_range_id[$nb-1]))$get_amount_amb=id2fields("amb_plan","amount","family_type_id=$family_type_id and age_range_id =".$age_range_id[$nb-1]."");
        if(($med=="on") && ($age_range_id[$nb-1]))$get_amount_med=id2fields("pre_med_plan","amount","family_type_id=$family_type_id and age_range_id =".$age_range_id[$nb-1]."");
        if(($doc=="on") && ($age_range_id[$nb-1]))$get_amount_doc=id2fields("doc_plan","amount","family_type_id=$family_type_id and age_range_id =".$age_range_id[$nb-1]."");
   
        //echo $get_amount_amb.'~~~'.$get_amount_med.'~~~'.$get_amount_doc.'<br>';
       
       
        if($class_type_id[$nb]<>5){ // NO class SP
       
            if($age_range_id[$nb-1])$get_amount=id2fields("policy","amount",
                "age_range_id=".$age_range_id[$nb-1]." and class_type_id=".$class_type_id[0]." and family_type_id=$family_type_id $add");
       
        }
        else { // Class SP
           
            if($age_range_id[$nb-1])$get_amount=id2fields("policy","amount",
                    "age_range_id=".$age_range_id[$nb-1]." and class_type_id=".$class_type_id[0]." $add");

        }
        $sum_amount=$get_amount+$get_amount_amb+$get_amount_med+$get_amount_doc;   
        /*echo "<b>".($get_amount?$get_amount:"NaN").($get_amount_amb?"- $get_amount_amb ":"").($get_amount_med?" - $get_amount_med ":"").($get_amount_doc?" - $get_amount_doc total : ----> $sum_amount ":"")."</b>";
            echo "<br>";*/
       
    //echo "==>".$age_range_id[$nb-1].'<br>';   
       
    if($age_range_id[$nb-1]){       
            echo "<tr>
                        <td id='policytd' style='font-size: 10pt; line-height:11pt;  font-family:tahoma;'>".$nb."</td>
                        <td id='policytd' style='font-size: 10pt; line-height:11pt;  font-family:tahoma;'>".($get_amount?number_format($get_amount,2,'.',','):"NAN")."</td>
                        <td id='policytd' style='font-size: 10pt; line-height:11pt;  font-family:tahoma;'>".($get_amount_amb?$get_amount_amb:"&nbsp; ")."</td>
                        <td id='policytd' style='font-size: 10pt; line-height:11pt;  font-family:tahoma;'>".($get_amount_med?$get_amount_med:"&nbsp; ")."</td>
                        <td id='policytd' style='font-size: …
drugoholic 0 Light Poster

Sorry I left it the username and password out

user: axa
password: guest

I appreciate you taking the time to look into this. If you check the attached txt file (policy.php.txt) you'll see that everything you've mentioned above is already done but what I'm looking for is to transform the whole table into something else which is kinda hard for me to do coz I don't exactly understand how the previous developer did this.

drugoholic 0 Light Poster

Hello everyone,

I'm having one annoying problem with a script I didn't even write.
First of all, let me just point out the issue;

If you goto this address (site is in french): LINK
You'll notice that it's a dynamic calculator, if you choose "individual" and click next, it'll show you just 1 row but if you choose "family of two, three or more" it'll show you extra rows depending on the number you've picked.

What I wanna do here is IF the user chooses "family of two" or more, to separate the table in the next step by making the rows "Age" and "NSSF" the only variable fields while when he selects the "Class Type" for one of the family, it should be applied to all the rest at once.

I hope I wasn't too confusing in this.

For example, if I choose "family of 3" and click next, the next table should be split into 2, first the user has to:

- "Class Type" which will be selected only once but applied to the 3 persons in the family.
- "Couverture Ambulatoire"
- "Couverture Médicament "
- "Couverture Visites Médicales"

After the user finishes making his selection, he should then find another table below where he'll be able to select the "Age Range" and "NSSF" for each of the 3 persons separately. I can't be any clearer than this, I did my best

drugoholic 0 Light Poster

Anyone please? :(

drugoholic 0 Light Poster

Hey there,

I'm currently using ja_Purity to create my own template and so far I've succeeded but now I'm having a new problem.
Please check the screenshot below, what I basically wanna do is make the big banner to stretch all over the page coz it's 1000px wide and the left, right and middle modules to come underneath it and so far I haven't been able to work it out.

Here is the css:

#ja-col {
    width: 1000px;
    overflow: hidden;
	/*padding-top: 10px;*/
}
#ja-col1 {
	float: none;
	display: block;
	width: 50%;
	padding-top: 10px;
	overflow: hidden;
}

#ja-col2 {
	float: right;
	width: 20%;
	overflow: hidden;
}

#ja-col1 table,
#ja-col2 table {
	border-collapse: collapse;
	border-spacing: 0;
}

#ja-col1 ul li,
#ja-col2 ul li {
	padding-left: 15px;
	margin: 0;
	background: url(../images/bullet.gif) no-repeat 5px 50%;
}

#ja-col1 ul, #ja-col2 ul {
	margin: 0;
}

#ja-col1 ol, #ja-col2 ol {
	margin-left: 5px;
}

#ja-col1 .article_separator,
#ja-col2 .article_separator {
	display: none;
}

Here is the tags:

<div id="ja-containerwrap<?php echo $divid; ?>">
<div id="ja-containerwrap2">
	<div id="ja-container">
	<div id="ja-container2" class="clearfix">

		<div id="ja-mainbody<?php echo $divid; ?>" class="clearfix">

		<!-- BEGIN: CONTENT -->
		<div id="ja-contentwrap">
		<div id="ja-content">
       
	   
	   <?php if ($this->countModules('bigbanner')): ?>
		<div id="ja-col" style="width: 1000px;">
			<jdoc:include type="modules" name="bigbanner2" style="xhtml" />
		</div><br />
		<?php endif; ?>
        
			<jdoc:include type="message" />

			<?php if(!$tmpTools->isFrontPage()) : ?>
			<div id="ja-pathway">
				<jdoc:include type="module" name="breadcrumbs" />
			</div>
			<?php endif ; ?>

			<jdoc:include type="component" />

			<?php if($this->countModules('banner')) : ?>
			<div id="ja-banner">
				<jdoc:include type="modules" name="banner" />
			</div>
			<?php endif; ?>

		</div>
		</div>
		<!-- END: CONTENT --> …
drugoholic 0 Light Poster

Hi

Please use the following and wriite the css code for IE7

/* This code has highest priority in IE7 */

*+html.(or)#class/Id name {

}


/* This code has highest priority in IE6 */
*html .(or)#class/Id name {

}

Thanks and regards
http://www.joomla-web-developer.com/
http://www.joomla-web-designer.com/

I have a special IE7 tag and it's still not doing any good. Here it is;

<!--[if gte IE 7.0]>
<style type="text/css">
.clearfix {display: block;}
</style>
<![endif]-->
drugoholic 0 Light Poster

then please paste the URL here if you have.

regards.

I'm working on my localhost so...

drugoholic 0 Light Poster

That didn't help :/

drugoholic 0 Light Poster

Hello guys,

I'm having another css compatibility issue with IE7. If you look at the screenshots attached below, you'll notice that the top menu is working fine in FF and IE8 (without clicking the comp. button) and when click the compatibility button, the whole header goes crazy (check ie7.gif). I know there is something wrong in my css code but I can't just figure out it out.

Anyway, here is the code and I really appreciate your help.

#ja-search {
	padding-left: 20px;
	padding-top: 40px;
	position: absolute;
	bottom: 30px;
	right: 0;
	overflow: visible;

}
#ja-search2 {
	padding-left: 0px;
	background: none;
	position: absolute;
	top: 40px;
	right: 0;
	height: 100px;
	border-top: #332C7A solid 3px;
}
#ja-search .inputbox {
	width: 120px;
	border: 1px solid #333333;
	padding: 3px 5px;
	color: #999999;
	background: #444444;
	font-size: 92%;
}

And these are the tags:

<div id="ja-headerwrap">
	<div id="ja-header" class="clearfix" style="display: block;">

	

	<?php
		$siteName = $tmpTools->sitename();
		if ($tmpTools->getParam('logoType')=='image'): ?>
		<h1 class="logo">
			<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
		</h1>
	<?php else:
		$logoText = (trim($tmpTools->getParam('logoText'))=='') ? $config->sitename : $tmpTools->getParam('logoText');
		$sloganText = (trim($tmpTools->getParam('sloganText'))=='') ? JText::_('SITE SLOGAN') : $tmpTools->getParam('sloganText');	?>
		<h1 class="logo-text">
			<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a>
		</h1>
		<p class="site-slogan"><?php echo $sloganText;?></p>
	<?php endif; ?>

	<?php $tmpTools->genToolMenu(JA_TOOL_FONT, 'png'); ?>

	<?php if($this->countModules('user4')) : ?>
    
		<div id="ja-search2">
			<jdoc:include type="modules" name="user4" />
		</div>
        
	<?php endif; ?>
    
    <?php if($this->countModules('user6')) : ?>
		<div id="ja-search">
			<jdoc:include type="modules" name="user6" />
		</div>
	<?php endif; ?>
	</div>
</div>
drugoholic 0 Light Poster

Well, then the RegExp must be wrong. Try it separately. There is plenty of email validation examples. When I put this into my Kate text editor it does not find any email address. Try to delete the last $ (dollar sign)

What last dollar sign?

Just a question, let's say I have 2 functions: docontinue() and emailvalidation() and I'm trying to call them with the onclick. So would this be correct:

onclick="return validemail() && doContinue();"

Or this

onsubmit = "return (validateEmail() && doContinue())"
drugoholic 0 Light Poster

- either finish the doContinue() function with somthing like: this.form.submit()

That didn't work.

- either use the type="SUBMIT" instead of type="BUTTON"

This also didn't work, I change the type to SUBMIT and I added an ONCLICK as well: onclick="return validemail() && doContinue();"

And still it wouldn't work.... It keeps asking me to enter an email whether I enter one or leave it blank.

And thanks alot for your help.

drugoholic 0 Light Poster

Sorry, I might have been misleading in my previous posts, but I figured out what the real problem is.

URL: http://www.avis.com.lb (check the form on the main page)

The problem is with the email field validation, I removed it and the form seems to be working fine.

My question is, I really need to have the email validation working, so what's the best way to do this?
Keep the 2 functions doContinue() and validemail() seperated and then call them with onclick="return docontinue() && validemail();" or merge the 2 functions and call them with 1 value onclick="docontinue()".

However, I tried both ways and none of them worked with coz I would really appreciate your help in here... :(

drugoholic 0 Light Poster

Hello,

I'm having a problem understanding why would a form I built before would stop working now. Basically I have some javascript functions that are being called in a reservation form with 2 buttons.

This is the JS code:

var bgMemory;	// save color information
var fgMemory;
var 	statusinfo = false;
function mOver(cell, id, statustxt)
{
     
      cell.style.cursor = 'hand';
      cell.style.backgroundColor='#e6e6e6';
	if (typeof document.getElementById(id + "cc") == "object")
	{
		Elem = document.getElementById(id + "cc");
		bgMemory = Elem.style.backgroundColor;
		Elem.style.backgroundColor='#e6e6e6';
	}
	if (typeof document.getElementById(id + "l") == "object")
	{
		Elem = document.getElementById(id + "l");
		fgMemory = Elem.style.color;
		Elem.style.color='#3D6484';
	}
	window.status=statustxt;
	statusinfo = true;
	return true;
}
function mOut(cell, id)
{
     
      cell.style.cursor = 'hand';
      cell.style.backgroundColor='';
      window.status="";
	if (typeof document.getElementById(id) == "object")
	{
		Elem = document.getElementById(id + "cc");
		Elem.style.backgroundColor = bgMemory;
	}
	if (typeof document.getElementById(id + "l") == "object")
	{
		Elem = document.getElementById(id + "l");
		Elem.style.color = fgMemory;
	}
	window.status='';
	statusinfo = false;
	return true;
}
function mClick(cell)
{
   if(event.srcElement.tagName=='TD')
   {
      cell.children.tags('A')[0].click();
   }
}
</script>
<script type = "text/javascript">
var xMonths = new Array( 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' );

function getListValue( option_object ) {
   return option_object.options[option_object.selectedIndex].value;
}

function setListValue( option_object, value  ) { option_object.selectedIndex = value; }

function addDays(myDate,days) {
    return new Date(myDate.getTime() + days*24*60*60*1000);
}
function init()
{
xToday = new Date();
yToday = addDays(new Date(),3);

xMonth = xToday.getMonth();
xDay = xToday.getDate()-1;
xYear = xToday.getYear()-2005; if (xYear < 2005) xYear=0;

yMonth = yToday.getMonth();
yDay = yToday.getDate()-1;
yYear = yToday.getYear()-2005; if (yYear < 2005) …
drugoholic 0 Light Poster

The code below is to validate the email field in my form, if the field left empty the javascript will alert "please fill in your email" and then it'll take you to a blank page that says "false". I don't want that to happen, I want them to re-enter their email after clicking the "OK" on the alterbox. I think it's something to do with my "else return true;" - it's a misplaced.

Thanks again :)

function doContinue( )
{

email=document.quickbooking.email.value;

	if (email=="")
	{
	alert("Please fill in your email");
	return false;
	}
	
	else if(email.indexOf ('@', 0) == -1 || email.indexOf ('.', 0) == -1)
	{
		alert("Please fill in your Email in the right format");
		return false; 
	}

xF = document.forms['quickbooking'];
xCountry = getListValue( xF.country );
xETADay = getListValue( xF.ETADay );
xETAMonth = getListValue( xF.ETAMonth );
xETAYear = getListValue( xF.ETAYear );
xETAHour = getListValue( xF.ETAHour );
xETAMinute = getListValue( xF.ETAMinute );
xETA = xETADay + '-' + xMonths[ parseInt( xETAMonth )-1 ] + '-' + xETAYear.substr(0,4) + '-' + xETAHour + '-' + xETAMinute;
xETTDay = getListValue( xF.ETTDay );
xETTMonth = getListValue( xF.ETTMonth );
xETTYear = getListValue( xF.ETTYear );
xETTHour = getListValue( xF.ETTHour );
xETTMinute = getListValue( xF.ETTMinute );
xETT = xETTDay + '-' + xMonths[ parseInt( xETTMonth )-1 ] + '-' + xETTYear.substr(0,4) + '-' + xETTHour + '-' + xETTMinute;
xWizardNumber = xF.wizard_number.value;
xName = xF.surname.value ;
xemail = xF.email.value ;
xParams = '&CTR=' + xCountry +'&Country=' + xCountry + '&ETA=' + xETA + '&ETT=' + xETT+ …
drugoholic 0 Light Poster

Well, thanks alot man but it got fixed :D

drugoholic 0 Light Poster

From the getListValue(option_object) function, try changing the whole block into this format:

function getListValue( option_object ) {
   return option_object[b].[/b]options[option_object.selectedIndex].value;
}

Thanks for the reply but that didn't work :/

drugoholic 0 Light Poster

Hey there,

I'm having a javascript problem and I can't really figure this out, some help would be greatly appreciated.

I have this custom made html/javascript form that passes the submitted values to another form (iframe) found on another website. All the fields are working except the "Country" field. This is the code of the iframe found in (avis.com.lb >> online car rental);

<div id="online-booking">
<iframe onload="iFrameHeight()"	id="blockrandom"
	name=""

		src="http://www.avisworld.com/avisonline/ibe.nsf/ReservationStep1?OpenForm&MST=B207502A93C850FEC12574EA002BB67B&RL_ETA=19-06-2009-09-00&RL_ETT=22-06-2009-09-00&RL_CHKNAME=&RL_WIZ=&RL_Country=LB0&RL_GRP1=&IBEOwner=EU&LNG=GB"
	
					
	width="100%"
	height="700"
	scrolling="auto"
	align="top"
	frameborder="0"
	class="wrapper">
	No Iframes</iframe>
</div>

I can't figure out where this code is, I've tried everywhere in the adminpanel and the php file with no result. The problem is, the iframe is set by default to fetch "Lebanon" as default country and it's bypassing the values selected in the previous form (on the main page).

You can view the form online here: http://www.avis.com.lb

I don't really know what's going on there :/

Here is the javascript on the page;

<script type = "text/javascript">
var bgMemory;    // save color information
var fgMemory;
var     statusinfo = false;
function mOver(cell, id, statustxt)
{
    
      cell.style.cursor = 'hand';
      cell.style.backgroundColor='#e6e6e6';
    if (typeof document.getElementById(id + "cc") == "object")
    {
        Elem = document.getElementById(id + "cc");
        bgMemory = Elem.style.backgroundColor;
        Elem.style.backgroundColor='#e6e6e6';
    }
    if (typeof document.getElementById(id + "l") == "object")
    {
        Elem = document.getElementById(id + "l");
        fgMemory = Elem.style.color;
        Elem.style.color='#3D6484';
    }
    window.status=statustxt;
    statusinfo = true;
    return true;
}
function mOut(cell, id)
{
    
      cell.style.cursor = 'hand';
      cell.style.backgroundColor='';
      window.status="";
    if (typeof document.getElementById(id) == "object")
    {
        Elem …