Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:59:17+00:00 2026-05-24T10:59:17+00:00

Hi there I have this code: function getFullnameDetails(mainHeight,upperstyle,type=”){ setTimeout(function(){fullnameCenter(mainHeight,upperstyle,type=”)},2000); } function fullnameCenter(mainHeight,upperstyle,type=”){ var distOfMainAndUpper

  • 0

Hi there I have this code:

function getFullnameDetails(mainHeight,upperstyle,type=''){
    setTimeout(function(){fullnameCenter(mainHeight,upperstyle,type='')},2000);
}
function fullnameCenter(mainHeight,upperstyle,type=''){
    var distOfMainAndUpper = mainHeight - upperstyle;
    var mainHalfHeight = mainHeight/2;
    var imageHeight = jQuery("img[rel='fullname']").height(); //there is a delay
    var imageHalfHeight = imageHeight/2;
    var fromImageTopToMainHalf = mainHalfHeight - imageHeight;
    var position = imageHalfHeight+fromImageTopToMainHalf-distOfMainAndUpper;
    if(type == 'big'){ jQuery("#temp .test1").css("bottom",position+"px"); }
    else { jQuery(".test1").css("bottom",position+"px"); }


}

It says that I’m missing ) after formal parameters.
This happens on this line:

function getFullnameDetails(mainHeight,upperstyle,type=''){ //IT HAPPENS HERE! :)
    setTimeout(function(){fullnameCenter(mainHeight,upperstyle,type='')},2000);
}

What am I doing wrong here.

Thanks in advance for the help 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:59:18+00:00Added an answer on May 24, 2026 at 10:59 am

    Javascript does not support default function parameter values.

    You can do things like this (but be wary of unintended ‘falsey’ values):

    function getFullnameDetails(mainHeight,upperstyle,type){
      type = type || ''; // if type is 'falsey' (null, undefined, empty string) assign ''
      //...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following piece of code from a book. There is this function
I have this code $('#Submit').click(function(event) { var checked = $('.inputchbox'); ......IE8 var ids= checked.map(function()
I have this code: var addNew = $('#divListBox').find(':checked') .map(function() { return $(this).val(); }).get(); I
I have this code: clearTimeout(tooltiptimeout); tooltiptimeout=; $(#tool).fadeOut(slow).queue(function(){ tooltiptimeout=setTimeout(function(){ $(#tool).css(left,item.pageX-33); $(#tool).css( top,item.pageY-95); $(#tool).fadeIn(slow); }, 1000);
I have this code : $(document).ready(function() { $('.DOFFDelete').click(function() { var id = $(this).attr(id); $.post(/Customer/DayOffDelete,
I have this code: <script type=text/javascript> $(document).ready(function() { $(#iframeId).contents().find(body).append($(#test)); }); </script> <iframe id=iframeId name=iframeId
I have this section of code: function createDownload() { var category, format, specification, download;
I have this code: $(document).ready(function() { var number = 10; var offset = 10;
So far i have this code: function changeGeoLoc($a,$b,$c){ echo <ul style='list-style-type: none; display:inline;'>; while(list(,$geoloc)
let's say I have this code in javascript: function doAnAjaxCall () { var xhr1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.